コード例 #1
0
        public void Init(Vector2 position, float width, float height, GUIStyle inPointStyle, GUIStyle outPointStyle, Action <ConnectionPoint> OnClickInPoint, Action <ConnectionPoint> OnClickOutPoint, Action <NodeBase> OnClickRemoveNode, NodeEditorWindow editor)
        {
            rect        = new Rect(position.x, position.y, width, height);
            this.editor = editor;
            outPoint    = new ConnectionPoint(this, ConnectionType.Out, outPointStyle, OnClickOutPoint);
            if (outPoints == null)
            {
                outPoints = new List <ConnectionPoint>();
            }

            outPoints.Add(outPoint);

            inPoint = new ConnectionPoint(this, ConnectionType.In, inPointStyle, OnClickInPoint);

            if (inPoints == null)
            {
                inPoints = new List <ConnectionPoint>();
            }

            inPoints.Add(inPoint);

            OnRemoveNode = OnClickRemoveNode;
        }
コード例 #2
0
        private static void LaunchEditor()
        {
            NodeEditorWindow win = (NodeEditorWindow)EditorWindow.GetWindow(typeof(NodeEditorWindow), false, "Procedural Texture Generator");

            win.autoRepaintOnSceneChange = true;
        }