예제 #1
0
        protected override void OnGUI()
        {
            GetCanvasSize();

            mainToolbar.OnGUI();

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            GUILayout.BeginHorizontal();

            ZoomableArea.Begin(new Rect(0, 0f, scaledCanvasSize.width, scaledCanvasSize.height + 21), scale, IsDocked);
            Begin();

            if (debugger != null)
            {
                DoNodes();
            }
            else
            {
                ZoomableArea.End();
            }
            End();

            if (centerView)
            {
                CenterView();
                centerView = false;
            }
            //GUI.Label(new Rect(5, 20, 300, 200), "Right click to create a node.", BehaviorTreeEditorStyles.instructionLabel);
            Event ev = Event.current;

            GUILayout.EndHorizontal();
            GUILayout.EndHorizontal();
        }
예제 #2
0
        private void DoNodes()
        {
            DoTransitions();
            DoChildIndex();

            if (debugger.Nodes.Count > 0)
            {
                for (int i = 0; i < debugger.Nodes.Count; i++)
                {
                    NodeDesigner node = debugger.Nodes[i];
                    DoNode(node, false);
                }
            }

            ZoomableArea.End();
            NodeContextMenu();
        }