/// <summary> /// Add a new track /// </summary> /// <param name="userData">TrackContextData for the track to be created.</param> private static void addTrack(object userData) { TrackContextData trackData = userData as TrackContextData; if (trackData != null) { GameObject item = CutsceneItemFactory.CreateTimelineTrack(trackData.TrackGroup, trackData.Type, trackData.Label).gameObject; Undo.RegisterCreatedObjectUndo(item, string.Format("Create {0}", item.name)); } }