Closed maxhacker11 closed 2 years ago
Update: In the NodeEditorGUI.cs the nodes are drawn on "OnGUI" so that is why I am only able to update the tints while drag selecting and interacting with the graph. But I am still not sure how I can make them update while I am in play mode as well?
Call NodeEditorWindow.current.Repaint();
each frame
public override void OnGUI() {
// Keep repainting the GUI of the active NodeEditorWindow
NodeEditorWindow.current.Repaint();
}
Wow, that solved it, thanks so much for the speedy reply and for creating such an amazing tool!
So I would like to visually see which node in the graph is currently being executed.
I managed to achieve this but it only works when I am interacting with the graph while in play mode (for example if I drag select)
I think it's because this forces the UI for the graph to redraw so it updates the node tint. As soon as I stop interacting with it, the nodes return to their default tints.
Hope I explained it well, here is my code to help explain it further.
I have created a "BaseStep" which has the following code:
Then I also have the custom editor for the node which just checks if the node is running and updates the tint:
Thanks a lot in advance! Regards, Max