How to Listen to Graph Events

States and transitions provide some events which are invoked when they are entered or exited. To add listeners to these events in the editor simply select the state or transition in the State Machine Graph and edit the OnEnterState, OnExitState or OnEnterTransition, OnExit Transition fields respectively. If you want to add listeners from script, check out the Listening to Events from Script and Writing Custom State Behaviours section.

Last updated