The StateFlow Editor

Toolbar, context menu, groups, notes and the live play-mode view.

The StateFlow Editor is where the flow is built. Open it from the StateFlow Editor button on a StateFlow Manager or StateFlow Asset, or by double-clicking a StateFlow Asset.

StateFlow Editor
The StateFlow editor with the minimap, the colour legend and the find field active on a large puzzle game graph.
The minimap, colour legend and Find state field on a full game's graph.

Toolbar

ControlDoes
State machineSwitches between the main machine and its sub-state machines.
Find stateFinds a state by name. Enter steps through the matches.
FollowIn play mode, keeps the active state in view.
SnapSnaps moved nodes and notes to the grid.
MinimapShows an overview of the whole graph, coloured by node type.
Center viewBrings every state back into view.
Color legendExplains what the node colours mean.

Below the toolbar, the breadcrumb shows the asset and the machine you are in. Click a parent to go back up. The info panel on the left shows whatever is selected: a state, a sub-state or a transition.

Node types and colours

Screen Popup Dialog Alert Script state Toast Global triggers Sub-state Linked machine

Context menu

Right-click the graph:

ItemDoes
Create › New › StateA prefab state. How to
Create › New › Sub-StateA new sub-state machine. Sub-states
Create › Existing › States / Sub-StatesAnother node for a state or machine that already exists in this asset
Create › Script StateA logic-only state. Script states
Create › ToastA toast. Toasts
Create › Global TriggersAn app-wide triggers node. Global triggers
Create › Linked State MachineA machine from another StateFlow Asset. Linked machines
Replace › …Swaps the clicked node for a new or existing one
Create Group, Group Selection, Remove From GroupFrames related nodes under a title
Add Sticky NoteA note for explanations and to-dos
Align › …Lines up the selected nodes
DuplicateCopies a sub-state machine with its states and transitions
Select Asset, Select PrefabSelects the state's State Asset or prefab in the Project window
DeleteRemoves the selection (also Delete or Backspace)

Edits in the graph support Undo and Redo.

Groups and notes

Groups and sticky notes have no effect at runtime. They are there to make a big graph readable. The samples use notes to explain what each graph demonstrates, and an "Always on" group to collect global triggers and the alerts and toasts they lead to.

Play mode

While the game runs, the graph shows the flow live:

StateFlow Editor — play mode
In play mode the Inspect<ShopItem> transition is lit with a 'Sword' chip and Item Detail is highlighted as the active state.
The flow just moved from Shop to Item Detail, carrying the Sword.