A State represents one mode of behavior, such as Idle, Patrol, Chase, or Attack. Use States to divide gameplay into clear modes so the graph shows what an object can do and how it moves between those modes.

A State Designer graph connects Patrol, Chase, and Attack states with explicit transitions.

In the editor

Create one State for each meaningful behavior mode and give it a name that describes that mode. Arrange the States so the main flow and the transitions between them are easy to follow.

For a GameObject workflow, add Actions to an Action State and configure them in the Element Inspector. Add Conditions to the outgoing transitions rather than to the State itself. The State organizes the mode, its Actions perform the work, and each transition’s Conditions decide when the mode may change.

Most gameplay extensions do not require a new State type. Create a new Action when the mode needs different behavior, or a new Condition when a transition needs a different rule.

Find and add a State

Press Space in the graph for the pointer-based selector, or open Tools > Opsive > State Designer > State Palette for a dockable browser. Search by State name or metadata, browse categories, and use Favorites for recurring entries. Recent keeps the last selected entries up to the limit in Preferences; 0 hides it. Documentation opens the entry’s documentation when its capability supplies a URL.

The selector’s Filter menu includes Kind > Built-in / Codebase, Member > Methods / Get Properties / Set Properties, Scope > Static / Instance, Returns, Requires, and Execution > DOTS / Managed. Clear Filters removes every constraint, and the number beside Filter is the active-filter count. A capability without the selected metadata is excluded. The dockable palette requires an open State Designer editor because it adds the selection to that window’s active graph.

Use State and group menus

Right-click one or more States or a group:

Command Result
Cut / Copy / Duplicate / Delete Applies the standard graph operation to the complete selection and retains compatible internal transitions when copied.
Enable / Disable Includes or excludes the selected State from execution.
Collapse / Expand Hides or shows child content where supported.
Set Color Adds an editor-only organizational color.
Replace Changes the State type and preserves compatible serialized fields. Review the Inspector because unsupported fields cannot transfer.
Edit Script / Locate Script Opens the State source or selects it in the Project window.
Set as Start Connects the Start event to the selected State.
Save as Subgraph Extracts a valid selected region using the workflow on Subgraphs.

The State hover toolbar exposes Enable/Disable, Collapse/Expand, adding a connected State, and More. More provides Replace, Set Color, Edit Script, and Locate Script.

Use the State Inspector

Selecting a State displays its serialized fields plus a custom name and comment. The gear menu provides Edit Script, Locate Script, and Reset; Reset restores the State defaults and clears its custom name and comment. A field’s watch icon displays its live value on the State without changing runtime behavior. Dragging a GameObject or Component onto a compatible State Inspector can create an Action State and assign the target automatically. Serialized editing commands are unavailable in Play Mode.

How it runs

The Start event enters the first State. While that State is active, its Actions run according to its configuration. State Designer evaluates the outgoing transitions, and a valid transition moves execution into its destination State.

For example, Patrol can run movement Actions until a detection Condition allows the transition to Chase. Chase can move toward the target until an in-range Condition allows Attack. If the target is lost, another transition can return the state machine to Patrol.

During Play mode, the editor identifies the active State so you can follow the current mode and inspect why a transition does or does not occur.

Key state choices

Action State

Use an Action State for a GameObject workflow that runs one or more Actions. Its Execution Type controls whether those Actions run in Sequence or in Parallel.

Iterator

Use Iterator when the same Actions should run once for each value in a list. Iterator assigns the current value and index to Shared Variables before it runs the contained Actions.

Repeater

Use Repeater when the same Actions should run a fixed number of times or continue until a transition interrupts them.

Any

Use Any for a transition that should be available from multiple normal States, such as interrupting Idle, Patrol, or Chase to enter Flee. Any is structural and does not run gameplay Actions.

Subgraph Reference

Use a Subgraph Reference when a graph should load reusable State Designer behavior stored in a Subgraph asset. This keeps shared behavior in one place while allowing it to be used by other graphs.