GlobalGameJame/Library/PackageCache/com.unity.timeline@1.2.10/Editor/Utilities/TrackModifier.cs
JonatanRek bea2dce063 Initial
test
2020-01-31 16:10:04 +01:00

22 lines
576 B
C#

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);
}
}
}