Calling Script Functions in Bolt

We have worked with calling bold variable functions from within a script before, but now we are looking to use Bolt to call a custom Function from within a script.

After you have created the Class containing the function. You need to add that script as a component of the object that also has the Bolt “Flow Machine” component on it.

You then need to tell bolt to look for this new class, that way it can make use of the functions in the class. You can do this by choosing

Tools > Bolt > Update Unit Options

in the unity menu. After this has complete, add a new Unit in your Bolt flow graph and search for your functions name. You should be able to choose your function now.

The function just happens to have the same name as the script in this demonstration.

This allows us to create any function we want and integrate it with Bolt!

Leave a Reply