behave-graph
behave-graph copied to clipboard
Flow editor - show values next to input nodes as they are updated
In the flow editor, there is no way to know what value is being set in each input, without using some internal console.logs. It would be great if in the flow editor, when a data edge is attached between output/input, the value gets shown on the input node:
is there a way, from the outside of the engine, to subscribe to when a node's input gets updated? This way we could potentially display that value in the node.
I created a function that can evaluate those at any time now....
https://github.com/bhouston/behave-graph/blob/main/packages/core/src/Execution/resolveSocketValue.ts
So you just need to figure out when to call this function. Technically it isn't very slow -- so you could, after every graph change, call this on every input socket? That would scale for at least a hundred or so nodes, and then eventually you'll have to be a bit smarter.
Nice this is useful! What about a way for those nodes to emit a value when they get a new one?