PO/Library/PackageCache/com.unity.timeline@1.4.8/Editor/Utilities/TrackModifier.cs

22 lines
576 B
C#
Raw Normal View History

2022-01-12 10:06:03 +03:00
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, "Delete Track");
TimelineEditor.inspectedDirector.ClearGenericBinding(track);
}
return timeline.DeleteTrack(track);
}
}
}