Idea for supporting dynamic nested Super Units

Marshall Brooks 3 years ago updated 3 years ago 1

So I know Bolt doesn't (Yet) support dynamic nested units, but I think I've figured out a workaround, with a couple modifications to the Custom Event system.

A custom event variant (since those already support dynamic object references and event strings) that supports a "Finished/Return" unit, that returns the control flow to the output of the event which triggered that flow.

So it acts like a nested Super Unit, which in reality it isn't really nested in that graph,  but emulates the swapping in and out of which Super Unit to run when that graph is ran.

You could take this a step further by having a Fallback option, with a linked macro to run if the defined machine cannot be found. Alternatively, if an exception is thrown, just go directly to the output node of that trigger.

This also lends to the Re-usability factor of units/machines, as the triggered graph doesn't need a user defined target to returning control flow.

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

I guess they are more or less nested Machines, but the point (and result) remains the same for the most part.