private void OnGUI() { var e = Event.current; var m = GUI.matrix; if (ActiveGraph == null || e.type == EventType.Ignore || e.rawType == EventType.Ignore) { return; } //Initialize(ActiveGraph); var editorNode = new EditorNode() { Node = ActiveGraph, Parent = null, Property = null, }; graphEditor = NodeGraphEditor.GetEditor(editorNode); graphEditor.position = position; if (EditorApplication.isPlayingOrWillChangePlaymode == false) { ActiveGraph.Initialize(ActiveGraph); ActiveGraph.Validate(); } Controls(); DrawGrid(position, Zoom, PanOffset); DrawZoomedNodes(); DrawConnections(); DrawDraggedConnection(); DrawSelectionBox(); DrawTooltip(); DrawGraphsControlls(); graphEditor.OnGUI(); GUI.matrix = m; }