Wiki

Case Status
Log In

Wiki

 
Home ยป API Reference»Accessing a PlayMakerFSM in Sc…
Index
Navigation
Community Wiki

Accessing a PlayMakerFSM in Scripts

There are a few ways to reference a PlayMakerFsm in your scripts:

1. Add a public PlayMakerFSM variable and link to the component.

C# example:

2. Use GetComponent to get an PlayMakerFSM Component on a GameObject.

Javascript example:

Another Javascript example:

3. Use GetComponents and the FsmName property to find a specific FSM on a GameObject that has multiple FSMs

Get all PlayMakerFSM components on a GameObject using GetComponents<PlayMakerFSM>(), then loop through them and find the one with the right FsmName.

EDIT: There is now a static utility method in PlayMakerFSM to make this easier:

 

Tags:

Last modified on 1/20/2016 5:07 PM by User.

  • RSS Feed