Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public static void ShowWelcome()
 {
     WelcomeWindow.ShowWindow(null);
 }
Ejemplo n.º 4
0
 public static void ShowWelcome()
 {
     WelcomeWindow.ShowWindow(typeof(NodeCanvas.BehaviourTrees.BehaviourTree));
 }