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; }
private static void LaunchEditor() { NodeEditorWindow win = (NodeEditorWindow)EditorWindow.GetWindow(typeof(NodeEditorWindow), false, "Procedural Texture Generator"); win.autoRepaintOnSceneChange = true; }