public static void DoTree(TreeGraph tree)
        {
            graphEditorWindow = GetWindow <BehaviourTreeGraphEditorWindow>();

            graphEditorWindow.behaviourTreeGraph          = tree;
            graphEditorWindow.behaviourTreeGraphGUI       = ScriptableObject.CreateInstance <GraphGUIEX>();
            graphEditorWindow.behaviourTreeGraphGUI.graph = graphEditorWindow.behaviourTreeGraph;

            graphEditorWindow._toolbarItems.Clear();
            AddToolBarItem("Save Tree", graphEditorWindow.behaviourTreeGraph.SaveGraphToSources);
            AddToolBarItem("New Leaf Node", graphEditorWindow.CreateNewLeaf);
            AddToolBarItem("New Selector Node", graphEditorWindow.CreateNewSelector);
            AddToolBarItem("New Sequence Node", graphEditorWindow.CreateNewSequence);
        }
 public static void Do()
 {
     graphEditorWindow = GetWindow <BehaviourTreeGraphEditorWindow>();
 }