ZMWSLI0-SL2021-GR11/cw1/clock/Library/PackageCache/com.unity.timeline@1.2.18/Editor/Utilities/TrackModifier.cs

22 lines
576 B
C#
Raw Permalink Normal View History

2021-04-10 17:27:42 +02: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);
}
}
}