From 22b379353016739d0d537ee3920299a00ce451f5 Mon Sep 17 00:00:00 2001 From: Thor Brigsted Date: Tue, 8 Sep 2020 18:43:32 +0200 Subject: [PATCH] Fixed mouse propagation in custom graph editors. Now you can use buttons and other controls. --- Scripts/Editor/NodeEditorGUI.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs index 21d6d0f..c0b1c5b 100755 --- a/Scripts/Editor/NodeEditorGUI.cs +++ b/Scripts/Editor/NodeEditorGUI.cs @@ -22,6 +22,7 @@ namespace XNodeEditor { Matrix4x4 m = GUI.matrix; if (graph == null) return; ValidateGraphEditor(); + if (e.isMouse) graphEditor.OnGUI(); Controls(); DrawGrid(position, zoom, panOffset); @@ -30,7 +31,7 @@ namespace XNodeEditor { DrawNodes(); DrawSelectionBox(); DrawTooltip(); - graphEditor.OnGUI(); + if (!e.isMouse) graphEditor.OnGUI(); // Run and reset onLateGUI if (onLateGUI != null) {