Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.6.0
Menu

Watch it run

Attach Live to one running object, read the status colors, open its values, pause that follower alone, and find where progress stopped.

Static answers “what did I author”. Live answers “what is this one instance doing right now”. The second question is the one you have at 2am when an enemy will not chase.

The Platformer enemy's two modes, patrolling until a stomp sends it to defeated. The screenshots below take the same object apart one graph at a time.
The Platformer enemy's two modes, patrolling until a stomp sends it to defeated. The screenshots below take the same object apart one graph at a time.

Two enemies patrol the Platformer scene from two different graphs, and one of them stopped walking. A log line tells you the method ran. It does not tell you which branch asked for it, what the condition above it compared, or whether that particular agent is even ticking. Live shows the running graph for the instance you selected, colored by what each node reported in the latest tick.

  • One agent out of a crowd behaves differently and the others are fine.
  • A branch runs when you expected a different one, and you want to see the value it compared.
  • An action holds Running longer than it should and you need to know whether it is waiting on your code or on the graph.

This uses the Platformer sample, and the same steps work on any GameObject in your own scene.

  1. Open Platformer.unity and press Play.

  2. Select Enemy Platform in the Hierarchy, then click the Behavior Agent component whose Graph reads EnemyPatrol so that component is the active selection. This object carries two agents, one per graph, and the editor attaches only when the selection names exactly one.

  3. The editor opens that graph in Live and the toolbar names the follower it is attached to, meaning the one running agent you are now watching. Attachment is exact: the editor does not search parents, children, or a convenient sibling when the selection is ambiguous.

The EnemyPatrol tree in Live mode with the repeat, sequence, condition and patrol call drawn in their status colors, and a Graph runtime status card in the right rail naming the active node, the current state and the last result.
Figure 1. EnemyPatrol running on Enemy Platform. Graph runtime status names the node that executed in the latest tick, so you never have to guess which color you are reading.
A state machine in Live mode. The patrolling state is drawn with a bright active outline while the defeated state stays dim, the transition between them carries the predicate stomped is not equal to zero, and the right rail shows Entry waiting, Active Update complete, and the Completion rule.
Figure 2. The same object’s state machine. The legend under the canvas names the colors, and the right rail counts what each lifecycle section has done this activation.

The legend under the canvas is the whole vocabulary: RUNNING, SUCCESS, FAILURE, TARGET UNRESOLVED THIS EVALUATION, and IDLE. A state machine canvas swaps that legend for ACTIVE and INACTIVE, because a state is one or the other. Read the graph from the active node outward.

  • The deepest node executed in the latest tick carries the active marker.
  • Running ancestors keep Running without pretending they executed again.
  • A node showing an older result is history, and the active marker is the only thing that says “this tick”.
  • Graph runtime status names the active node, the current state, the last result, the last transition and which side owns the values. Its Active node row is a reading; the separate Focus → control above it centers the canvas on that node, which is what you want once the graph outgrows the viewport. Pending requests sits below the card whenever the graph is waiting on something external.
  1. Open Blackboard · Whole graph in the right rail. Its header reads “live · read-only · declaring and valuing are Static authoring”, and each row names who owns the value.

  2. Read the ownership before you read the number. A value your own code owns instead of the graph is reported as (unavailable), because the editor observes the graph and the host owns that storage.

The live Blackboard values section in the BLACKBOARD · WHOLE GRAPH panel, listing the route declaration and the profile declaration under HOST AUTHORITATIVE, each with its value reported as unavailable beside a read-only runtime snapshot note.
Figure 3. The Live blackboard on the Platformer patrol. It lists what the graph declares, grouped by who owns each value, and says so plainly when a host-owned value is one it cannot read.

Live blackboard entries are read-only. A surfaced GameObject property or field can offer a Live editor when all of this is true:

  • The target resolves.
  • The value has a supported editor.
  • The binding pushes to the member.
  • The member is writable.

An accepted edit changes that running instance and leaves the graph file alone. Live editing walks every part of that editor and every way it can refuse.

  1. Choose pause in the toolbar, or press Space while the editor has focus. Space is bound in Live only.

  2. Confirm the other enemy keeps patrolling while this one holds still. The pause belongs to the agent the editor is attached to, and the rest of the scene carries on without it.

  3. Choose step, or press ., to grant one ordinary evaluation, then read the active node and its result.

  4. Choose resume when you have what you need.

Paused on one follower while the scene keeps playing. Each step grants exactly one evaluation.
Paused on one follower while the scene keeps playing. Each step grants exactly one evaluation.
The Live toolbar strip with the Static and Live segmented control on Live, a resume control showing a play triangle, an enabled step control beside it, and the follower identity Enemy Platform marked attached with the tick rate.
Figure 4. Paused on one follower. The control now offers resume, step is enabled beside it, and the toolbar keeps naming which follower you hold.

Per-follower pause and step apply to an ordinarily scheduled GameObject agent. When game code drives a disabled agent through TickOnce, the external scheduler owns advancement, so use Unity’s own Pause and Step instead. Entity graphs are inspected read-only and also use Unity’s global controls.

Step until the picture disagrees with what you expected, then read one level out.

A Live state machine after the player stomped the enemy, with the defeated state active and its three update actions listed.
Figure 5. The same machine after a stomp. The mode changed, and the actions inside the new mode are the next thing to read.
A cropped right rail showing the defeated state inspector with its three actions reported complete.
Figure 6. The state inspector after that change: stop movement, become harmless, and apply defeated appearance have all completed.

When it goes wrong

SymptomCheckFix
The editor stays on Static.Confirm Play Mode is running and the selected host initialized.Select an initialized running host. Switching the toolbar alone cannot invent a runtime target.
The wrong graph opens.Count the Behavior Agent components on the selected GameObject.Select the exact agent whose graph you want to watch.
Pause does nothing.Read whether the agent is ordinarily scheduled or driven by game code through TickOnce.Use Unity global Pause and Step when an external scheduler owns advancement.
A value looks stale.Find the active marker and confirm which node executed in the latest tick.Read the retained result as history and the marked node as now.
The attachment drops.Look for a reset, a replacement object, a reimport, or runtime reinitialization.Each of those changes identity. Select the still running target again.
An edited Live value did not survive Play Mode.Confirm whether you edited the instance or the graph default.Edit defaults in Static. A Live edit is deliberately scoped to the one running instance.
Full-size image