示例#1
0
        //Open GraphEditor initializing target graph
        public static GraphEditor OpenWindow(Graph newGraph, Component agent, IBlackboard blackboard)
        {
            var window = GetWindow <GraphEditor>();

            window.willRepaint  = true;
            window.fullDrawPass = true;
            window.rootGraph    = newGraph;
            window.targetOwner  = null;
            if (window.rootGraph != null)
            {
                window.rootGraph.agent             = agent;
                window.rootGraph.blackboard        = blackboard;
                window.rootGraph.currentChildGraph = null;
                window.rootGraph.UpdateNodeIDs(true);
                window.rootGraph.UpdateReferences();
            }

            Graph.currentSelection = null;
            if (NCPrefs.showWelcomeWindow && !Application.isPlaying && welcomeShown == false)
            {
                welcomeShown = true;
                var graphType = newGraph != null?newGraph.GetType() : null;

                WelcomeWindow.ShowWindow(graphType);
            }

            return(window);
        }
示例#2
0
        ///Open GraphEditor initializing target graph
        public static GraphEditor OpenWindow(Graph newGraph, GraphOwner owner, IBlackboard blackboard)
        {
            var window = GetWindow <GraphEditor>();

            SetReferences(newGraph, owner, blackboard);
            if (NCPrefs.showWelcomeWindow && !Application.isPlaying && welcomeShown == false)
            {
                welcomeShown = true;
                var graphType = newGraph != null?newGraph.GetType() : null;

                WelcomeWindow.ShowWindow(graphType);
            }
            return(window);
        }
示例#3
0
 public static void ShowWelcome()
 {
     WelcomeWindow.ShowWindow(null);
 }
示例#4
0
 public static void ShowWelcome()
 {
     WelcomeWindow.ShowWindow(typeof(NodeCanvas.BehaviourTrees.BehaviourTree));
 }