Ejemplo n.º 1
0
        /// <summary> 从Graph类型获取对应的GraphWindow </summary>
        public static TimelineWindow GetGraphWindow(Type graphType)
        {
            var windowType = TimelineEditorUtility.GetGraphWindowType(graphType);

            UnityObject[]  objs   = Resources.FindObjectsOfTypeAll(windowType);
            TimelineWindow window = null;

            foreach (var obj in objs)
            {
                if (obj.GetType() == windowType)
                {
                    window = obj as TimelineWindow;
                    break;
                }
            }
            if (window == null)
            {
                window = GetWindow(windowType) as TimelineWindow;
            }
            window.Focus();
            return(window);
        }
Ejemplo n.º 2
0
 public void Init(TimelineWindow editorWindow, BaseTimelineGraph model)
 {
     this.window = editorWindow;
     this.Model  = model;
     OnInit();
 }