示例#1
0
        private void DoNodes()
        {
            DoTransitions();
            DoChildIndex();

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

            ZoomableArea.End();
            NodeContextMenu();
        }
示例#2
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 (m_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();
        }