You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
It seems that NodeEditorAction (NEA) is eating the hotControl before the button click is registered.
I've narrowed it down to the below section of NEA, specifically setting the hotControls to zero, but I don't know how to properly fix it myself without potentially breaking something else:
else if (!IsHoveringNode) {
// If click outside node, release field focus
if (!isPanning) {
// I've got no idea which of these do what, so we'll just reset all of it.
GUIUtility.hotControl = 0;
GUIUtility.keyboardControl = 0;
EditorGUIUtility.editingTextField = false;
EditorGUIUtility.keyboardControl = 0;
EditorGUIUtility.hotControl = 0;
}
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
}
Situation:
I'm trying to add a global controls box in the corner of the xNode window using my graph's custom editor's OnGUI.
[CustomNodeGraphEditor(typeof(NewNodeGraph))]
public class NewNodeGraphEditor : NodeGraphEditor
{
public override void OnGUI()
{
base.OnGUI();
if (GUILayout.Button("this button doesn't log anything unless you pan or modify NEA"))
{
Debug.Log("CLICK");
}
}
}
Further information:
I tried to call use() on the current event when the graph editor's OnGUI button is clicked, but it seems that NEA has priority and clears the control before the button click goes through properly.
The control box buttons (used to zoom in the below gif) work after panning:
Considerations:
Is it necessary to reset the hotControl in the first place?
The control box obviously isn't IsHoveringNode.
Is there a way to check that the click is specifically on the editor's background?
The text was updated successfully, but these errors were encountered:
Issue:
It seems that NodeEditorAction (NEA) is eating the hotControl before the button click is registered.
I've narrowed it down to the below section of NEA, specifically setting the hotControls to zero, but I don't know how to properly fix it myself without potentially breaking something else:
Situation:
I'm trying to add a global controls box in the corner of the xNode window using my graph's custom editor's OnGUI.
Example implementation: https://github.com/dashrava/xNode/tree/hotControlIssue
(Usage: Open graph.asset, try to press button before and after panning.)
Relevant code bit:
Further information:
I tried to call use() on the current event when the graph editor's OnGUI button is clicked, but it seems that NEA has priority and clears the control before the button click goes through properly.
The control box buttons (used to zoom in the below gif) work after panning:
Considerations:
Is it necessary to reset the hotControl in the first place?
The control box obviously isn't
IsHoveringNode
.Is there a way to check that the click is specifically on the editor's background?
The text was updated successfully, but these errors were encountered: