How to get a C# event unit in a Bolt transition flow graph?

Viewed 556

I want to use Bolt to visualize the state machines in my game. All the logic will be in C# scripts and I'll use Bolt only as a visualization tool to my FSMs to increase maintainability of those state machines.

Most of the state machines in my game reacts to events managed by other classes in my game. So basically I need to create logic for the transitions between events in a Bolt transition graph which starts by listening to those C# events.

How can I do that? How can I listen to an arbitrary C# event inside a Bolt graph? All I can find in the docs involves triggering Bolt CustomEvent in a C# script; which is not what I want.

1 Answers

You can create an Empty Object and you can activate it when event happens and you can check if this EmptyObject is activated.

if(GameObject.activeSelf == true)
{

//Your script when event happens

}

Script for activating object

GameObject.SetActive(true);

and if you want to run event in bolt the same thing in bolt

Related