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
On the frame that mouseDown is called, we get a frame that is the mouse event frame and on this line of code GUILayoutUtility.GetLastRect().size; returns (1, 1) for the size causing hoveredNode to be set to null and cause the exception on the next frame.
I'm not sure if this is the correct solution, but locally my solution was to change that line to this instead: Vector2 nodeSize = nodeSizes[node];
The text was updated successfully, but these errors were encountered:
After a bit further testing, my above solution seems to fix the issue in 99% of cases but it still occasionally happens immediately after the window is re-created the first time you click on a node and therefore before the nodeSize is cached. Still a significant improvement, but not a complete fix. I'm not entirely sure why nodeSize isn't cached on previous repaints, but that seems to be what's happening.
When mouseDown is followed by mouseUp too quickly, exactly one frame apart, SelectNode causes a null reference exception.
This appears to be because of the following line of code:
xNode/Scripts/Editor/NodeEditorGUI.cs
Line 521 in 5967cef
On the frame that mouseDown is called, we get a frame that is the mouse event frame and on this line of code
GUILayoutUtility.GetLastRect().size;
returns (1, 1) for the size causing hoveredNode to be set to null and cause the exception on the next frame.I'm not sure if this is the correct solution, but locally my solution was to change that line to this instead:
Vector2 nodeSize = nodeSizes[node];
The text was updated successfully, but these errors were encountered: