0
Answered

Variable Interface (State and Flow Macro)

Daniel 8 months ago updated 8 months ago 2

Hi,

I'm looking for a way to set force a machine associated with either a State or a Flow macro to declare some objects variables when it's on a game object.

Like an interface in C# if you will where you define the structure but not the value of the variable itself.

In my case, I have 4 objects with the same logic so each object has a State Machine on it with the same State macro. The State macro requires a List of Gameobject and a List of Materials.

Right now I have to go in each of the object's Machine and create Object Variables that match what the State Macro expects in terms of Variable Name and Variable Type.

I don't want to use Scene/App variables since I don't want to duplicate the variable, I just want to change its value per Object basically.


Is there a way to do this?




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

Hi Daniel,

Unfortunately, that is a core limitation of the variable system in Bolt 1.

In Bolt 2, which is currently in alpha, variables are grouped under classes, and they work exactly like you describe.

Hi Lazlo,

Ok great! Thank you for the quick answer!

I'll give Bolt 2 a try when it goes into Beta then :)

Cheers!