Beispiel #1
0
        internal override UnityEditor.Graphs.GraphGUI GetEditor()
        {
            GraphGUI graphGUI = ScriptableObject.CreateInstance <GraphGUI>();

            graphGUI.graph     = this;
            graphGUI.hideFlags = HideFlags.HideAndDontSave;
            return(graphGUI);
        }
Beispiel #2
0
        private void DeleteSelection()
        {
            List <string> list = this.CollectSelectionNames();

            if (list.Count == 0)
            {
                return;
            }
            if (GraphGUI.DeleteNodeDialog(list.ToArray()))
            {
                this.blendTreeGraph.RemoveNodeMotions(this.selection);
                this.blendTreeGraph.BuildFromBlendTree(this.blendTreeGraph.rootBlendTree);
            }
            this.ClearSelection();
            this.UpdateUnitySelection();
        }
Beispiel #3
0
        private void DeleteNodeCallback(object obj)
        {
            Node node = obj as Node;

            if (!node)
            {
                return;
            }
            string[] toDelete = new string[]
            {
                node.motion.name
            };
            if (GraphGUI.DeleteNodeDialog(toDelete))
            {
                this.blendTreeGraph.RemoveNodeMotions(new Node[]
                {
                    node
                });
                this.blendTreeGraph.BuildFromBlendTree(this.blendTreeGraph.rootBlendTree);
            }
        }
 private void Init()
 {
     if (this.m_LayerEditor == null)
     {
         this.m_LayerEditor = new LayerControllerView();
     }
     this.m_LayerEditor.Init(this);
     if (this.m_ParameterEditor == null)
     {
         this.m_ParameterEditor = new ParameterControllerView();
         this.m_ParameterEditor.Init(this);
     }
     if (this.stateMachineGraph == null)
     {
         this.stateMachineGraph           = ScriptableObject.CreateInstance <UnityEditor.Graphs.AnimationStateMachine.Graph>();
         this.stateMachineGraph.hideFlags = HideFlags.HideAndDontSave;
     }
     if (this.stateMachineGraphGUI == null)
     {
         this.stateMachineGraphGUI = (this.stateMachineGraph.GetEditor() as UnityEditor.Graphs.AnimationStateMachine.GraphGUI);
     }
     if (this.blendTreeGraph == null)
     {
         this.blendTreeGraph           = ScriptableObject.CreateInstance <UnityEditor.Graphs.AnimationBlendTree.Graph>();
         this.blendTreeGraph.hideFlags = HideFlags.HideAndDontSave;
     }
     if (this.blendTreeGraphGUI == null)
     {
         this.blendTreeGraphGUI = (this.blendTreeGraph.GetEditor() as UnityEditor.Graphs.AnimationBlendTree.GraphGUI);
     }
     if (this.m_BreadCrumbs == null)
     {
         this.m_BreadCrumbs = new List <AnimatorControllerTool.BreadCrumbElement>();
         this.ResetBreadCrumbs();
     }
     AnimatorControllerTool.tool = this;
 }