Ejemplo n.º 1
0
        void OnEnable()
        {
            InitToolRes();

            if (currentGraph == null)
            {
                currentGraph = ScriptableObject.CreateInstance <UIGraph>();
                Vector2 pos = new Vector2(position.width / 2, position.height / 2);
                currentGraph.AddNode <RootNode>(pos);
            }

            _willRepaint  = true;
            _zoomPivotPos = new Vector2(position.width / 2, position.height / 2);

            EditorApplication.playmodeStateChanged += PlayModeChange;
        }
Ejemplo n.º 2
0
 public void AddUIGraphNode(UIGraphNode node)
 {
     Graph.AddNode(node);
     DrawGraph();
 }