NodeGraphProcessor icon indicating copy to clipboard operation
NodeGraphProcessor copied to clipboard

Conditional Graph not visually updating nodes at runtime

Open leissler opened this issue 4 years ago • 3 comments

In the "Conditional Graph" scene, which uses the RuntimeConditionalGraph Monobehavor, when going into Unity play-mode, I can see the outputs of the executed Debug.Log nodes, but the open graph doesn't animate the runtime flow. This flow animation is shown seemingly only when using "Step" in the conditional processor.

I'm thinking of creating a high-level visual scripting system based on NGP, which needs such a feature and also would need to be able to show failed node states.

leissler avatar Jun 30 '21 16:06 leissler

Animation flow is not implemented, that's why you don't see it :)

This flow animation is shown seemingly only when using "Step" in the conditional processor.

This was more a debug tool than something you can really use to visualize the execution flow, especially because when all the graph is processed, you don't see anything because the execution is instantaneous.

I think it's possible to implement something to visualize the execution flow that looks like what you have in bolt with the GraphView API, especially the Edge: https://docs.unity3d.com/ScriptReference/Experimental.GraphView.Edge.html In the EdgeControl you have the positions used to create the edge, so it should be possible to interpolate an element between those points so that it follows the edge.

alelievr avatar Jul 01 '21 22:07 alelievr

Thanks for that insight! I was thinking of visualizing the flow more like the example of FlowReactor (https://youtu.be/FTvkxF3_YPI) rather than Bolt. So it's no problem that execution is instantaneous and not frame-based. I will have to dig deeper into the Conditional Graph (btw: why did you name it that way? What's "conditional" about it?) example to see how to create a custom processor that visually updates the flow.

leissler avatar Jul 05 '21 21:07 leissler

For a high-level visual scripting system I want to have the following features:

  • Animated visualization of graph execution (also with possible error states for nodes)
  • Variable blackboard objects (looking similar to your parameter-views)
  • Graphs referencing variable blackboards/blackboard-objects. (In one of your examples you already have graph parameters that are overridable in a scene)
  • Custom event system that can raise and catch events with parameters

Any suggestions or hints from the master himself? ;)

leissler avatar Jul 07 '21 11:07 leissler