public static TrackBehaviourEditor Create(System.Type editorType, TrackBehaviour track) { var editor = System.Activator.CreateInstance(editorType) as TrackBehaviourEditor; editor.Initialize(track); return(editor); }
TrackBehaviourEditor CreateTrackEditor(TrackBehaviour track) { var customEditorType = GetCustomTrackEditor(track.GetType()); if (customEditorType == null) { return(TrackBehaviourEditor.Create(typeof(TrackBehaviourEditor), track)); } return(TrackBehaviourEditor.Create(customEditorType, track)); }
void Initialize(TrackBehaviour track) { m_Track = track; m_ClipEditors = new List <ClipBehaviourEditor>(); Enable(); }