Under Review

Flow history

Real World 4 years ago updated 4 years ago 10

It would be helpful to show if the flow has passed through a particular path by clicking on the arrow at run time. Currently, we can glean this information in part when flow passes through a path that requests a variable as it displays the variable but other paths require a certain amount of guesswork.

This is a problem for me as I'm debugging my UI flow. When a menu fails to display or displays the wrong menu I have to try and figure out how it got to the point it got to. If I know which units were called and in which order, that would help massively.

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

I think this ties in slightly with the requirement for setting breakpoints and step into features I think is planned for a release, 


Like you would toggle on the unit before your menu would open and step into to see which branch your flow takes.

That would be before the event debugging. This is after the event as I don't know before the event what flow is going to be executed

You want some kind of post visualisation of the path it took?  Like an arrow to show you the path from each unit?

Or a log showing the game frame/time a path was taken for the currently selected arrow. It could potentially go through a path more than once I guess.

Have a list of transitions and clicking each one in the list will show a different arrow showing the transition from one unit to the other? allowing you to step through the history of transitions?  I say this because as you say about loops, probably impractical the more i think about arrows scattered everywhere over the graph?

So for example, you could have 

Transition 1 would show an arrow from Update -> Branch

Transition 2 would show an arrow from Branch -> Unit connected to the true control output,etc

Play through each one until you see the transition that went to the wrong menu in your case, then you can backtrack how it reached that path?

Not sure you understand what I mean. The connections don't change at run time. If Unit A is connected to Unit B by connection i, then clicking i should show me whether the connection has had flow through it. Even if Branch unit A was connected to Unit B by connection i and Unit C by connection ii then those are two separate connections that you could click and query. You can figure out the flow just by knowing if a connection was triggered.

It doesn't have to be overly complicated. My idea would be any connection that flow has passed through shows in a different colour in the graph. Tapping the connection shows stats in graph inspector panel. Stats show the last x times a connection was triggered. 

Typical use is a Super Unit macro is reused in multiple places. Super Unit contains a Custom Event unit. As the developer, I know that that Custom Event should not be called unless some nodes before it are called. I need to track down which instance of that Super Unit macro in all of my graphs triggered the event. There's no way to do that currently

I wasn't describing connection changes, I was describing a way of tracing flow transitions.  

If you just want invocation statistics to show how many times it's been called (>0 would satisfy your 'has it been called ' requirement, but as it could be called many times it would might best reflected as a count) and that in itself is useful as well.

My suggestion would compliment this as you can then trace how this was called/where this is going wrong.  If it's branching off a different path because i selected the wrong operator unit for a condition (hit me a few times) then i can see how I arrived to a particular unit or how a unit was never bypassed  

Under Review

Interesting idea. I see one major memory concern, though: keeping track of traversal times for stats means keeping a list of floats for every connection/transition. This quickly eats up a lot of memory, and allocates as the list grows.

Something I could implement without this drawback, though, is that if a connection/transition has been traversed, it stays with a certain visual indicator (e.g. become blue). This should be an editor pref, because it can be confusing for new users. Not a huge fan of the blue color because it's a bit ambiguous with number connections, but something along those lines. 

What do you think?

That would help, certainly. I understand the memory concern but as it's an editor only feature and I would expect it to be a feature that needed to be turned on manually I don't see that as a huge obstacle.

To tell you the truth, I thought the stats part was really for Real World's requirement - I don't want to hijack his/her idea :) 

My complimentary idea was to be able to toggle history tracing to build a list of unit transitions, so you can step through what led where, only drawing the arrows as you select a transition from the list.

For example, in this graph when run there would be a list of 2 transitions, when i click the first one it would view the graph like this:

And if I clicked the second one it could view the graph like this (excuse the poor editing lol)