mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
22 lines
576 B
C#
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);
|
||
|
}
|
||
|
}
|
||
|
}
|