/// <summary> /// Initializes the dialog editor. /// </summary> private void Awake() // Like a constructor. Called at start { GraphEditor = new WireGraphEditor(this); clickManager = new ClickManager(this); ConnectionMaker = new ConnectionMaker(this); TransformationsManager = new TransformationsManager(this); Background = new Background(); ContextMenu = new DialogContextMenu(this); GUIScaleUtility.Init(); }
public void DrawMouseCurve() { Vector2 mousePosGlobalSpace = Event.current.mousePosition; Rect rect = new Rect( sourcePinDisplayer.InteractionRect.position + sourcePinDisplayer.OwnerDisplayer.WindowRect.position, sourcePinDisplayer.InteractionRect.size); Rect mouseRect = new Rect(mousePosGlobalSpace.x, mousePosGlobalSpace.y, 1, 1); WireGraphEditor.DrawNodeCurve(rect, mouseRect, Color.white); editor.Repaint(); }