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

About Transition Labels

PreviousAbout Transition IDs and Renaming TransitionsNextHow to Trigger a Transition

Last updated 2 years ago

Was this helpful?

You can assign a label to a transition, which in contrast to the ID, does not need to be unique.

Example

Imagine you create a State Machine controlling your UI and have a return button on each panel. You could now assign the label “Return” to all transitions which should perform a return and call the TriggerByLabel method when the button is clicked.

How to Assign a Label to a Transition

Select the transition you want to assign a label to, by clicking on it in the State Machine Graph window. In the Inspector select the Label text field at the top and enter the label you want to use.