protected virtual void OnGUI() { Event e = Event.current; Matrix4x4 m = GUI.matrix; if (graph == null) { return; } ValidateGraphEditor(); graphEditor.OnEarlyGUI(); Controls(); DrawGrid(position, zoom, panOffset); DrawConnections(); DrawDraggedConnection(); DrawNodes(); DrawSelectionBox(); DrawTooltip(); graphEditor.OnGUI(); // Run and reset onLateGUI if (onLateGUI != null) { onLateGUI(); onLateGUI = null; } GUI.matrix = m; }