Visual State Machine
  • Welcome
  • FAQ
  • Get Started
    • Setup
    • How to Create a State Machine
    • How to Open the Graph Editor
    • How to Create a State
    • About State IDs and Renaming States
    • How to Duplicate States
    • How to Set the Entry State
    • How to Create a Transition
    • About Transition IDs and Renaming Transitions
    • About Transition Labels
    • How to Trigger a Transition
    • How to Trigger a Transition by Label
    • How to Listen to Graph Events
  • Advanced
    • Execution Order
    • Listening to Events from Script
    • Writing Custom State Behaviours
    • Extending VSM
Powered by GitBook
On this page

Was this helpful?

  1. Get Started

How to Listen to Graph Events

PreviousHow to Trigger a Transition by LabelNextExecution Order

Last updated 2 years ago

Was this helpful?

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 and section.

Listening to Events from Script
Writing Custom State Behaviours