Edit State Machines
Overview
The timeline panel includes a visual State Machine section.
Workflow
- Select or create a state machine.
- Add inputs (
boolean | number | trigger) for transition conditions. - Add states and bind each state to a timeline.
- Add transitions between states with duration, optional exit time, optional condition, and optional priority.
- Click a state or transition to edit it.
- Use Set Entry to choose the entry state.
- Use Play/Pause to test state switching.
- Use runtime input controls to set input values or fire triggers.
Edit Operations
- Inputs: add, update, delete.
- States: add, update, set entry, delete.
- Transitions: add, update, delete.
Behavior Notes
- Deleting a state removes transitions that reference it.
- Deleting an input removes transition conditions that reference it.
- State machine changes are persisted and included in undo/redo history.
- If multiple transitions match at the same time, higher
prioritywins deterministically. - Runtime evaluation diagnostics are available through
editor.animation.getStateMachineDiagnostics(machineId).
Script Integration
State machine runtime can drive script hooks through bindings (onRun, onStateChange).
Related pages: