Calling a Flow Macro by a Variable reference?

mykillk 3 years ago 0

I have a State Machine on my GameObject running a State Graph that keeps track of player interactions. One of these potential interactions is called Activation, which is when the player clicks on the GameObject.

The handling Flow logic can be very different depending on which GameObject was Activated, so I have many different Flow Macros for different types of Activation. 

So, I would like to be able to assign a Flow Macro as a Bolt Object Variable, and then the State Graph calls whatever Flow Macro is assigned. I can't seem to find any way to do this, either directly in the Bolt graphs or with helper C# code. I suppose I could add every single Activation Macro to the State Graph with a whole bunch of extra transitions and additional logic to determine which is the correct one at runtime, but this seems like a lot of unnecessary work.

It would be pretty sweet if you could drag & drop a Bolt Variable that is of a Macro type into a graph and have it treated the same as a Macro asset.

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