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 State IDs and Renaming States

PreviousHow to Create a StateNextHow to Duplicate States

Last updated 2 years ago

Was this helpful?

Each state inside of a State Machine needs to have a unique ID assigned to it, which allows to identify it. You can use the ID of a state to access it via code in your scripts.

How to Change the ID of a State

  1. You can assign your own IDs to states. First, select a state in the State Machine Graph window. In the Inspector select the ID field at the top and enter the ID you want to use.

Since each state needs to be identifiable inside of the State Machine by its ID, you cannot assign the same ID to multiple states.