You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
585 B
21 lines
585 B
using UnityEngine; |
|
using UnityEditor; |
|
using UnityEngine.Timeline; |
|
using UnityEngine.Playables; |
|
|
|
namespace UnityEditor.Timeline |
|
{ |
|
static class TrackModifier |
|
{ |
|
public static bool DeleteTrack(TimelineAsset timeline, TrackAsset track) |
|
{ |
|
if (TimelineEditor.inspectedDirector != null) |
|
{ |
|
TimelineUndo.PushUndo(TimelineEditor.inspectedDirector, L10n.Tr("Delete Track")); |
|
TimelineEditor.inspectedDirector.ClearGenericBinding(track); |
|
} |
|
|
|
return timeline.DeleteTrack(track); |
|
} |
|
} |
|
}
|
|
|