StateTree Debug Overlay
StateTree Debug Overlay draws short text above an Actor while a StateTree state is active. Use it in PIE to confirm that a state entered, bound text changed, and exit cleanup occurred. It is local read-only HUD diagnostics, not replicated state or Shipping UI.
For StateTree setup, see Integrate StateTree and Blackboard; for settings, see Project Settings and Blackboard; for runtime panels, see GameplayDebugger.
Prerequisites
Draw code is compiled only in Editor plus debug-drawing build conditions. At runtime, enable both CVars:
1gais.DebugOverlay.Enable 12gais.DebugOverlay.StateTree 1
Turning either off stops drawing. The overlay is neither replicated nor saved as game UI state; in multiplayer each local client sees only its own HUD drawing.
StateTree Task
Add Task: Debug Overlay Text to a StateTree.
Field | Meaning |
|---|---|
| Static state/diagnostic text such as |
| Runtime-bound text appended after static text, for a target name, count, or reason. |
| World-space anchor; when null, uses the StateTree execution owner. |
When ReferenceActor is a Controller, drawing resolves its current Pawn. A Pawn or ordinary Actor is used directly. Entering the state registers text and exiting unregisters it. The Task returns Running and has bConsideredForCompletion disabled, so it does not affect StateTree completion.
Project settings
These UGAIS_DeveloperSettings Debug Overlay fields exist only in Editor data.
Setting | Purpose |
|---|---|
| World-space text offset from the Actor. |
| HUD text scale. |
| Text color. |
| Optional Pawn-class filters; empty draws any Actor, otherwise only matching Pawns. |
Filtering applies to the final draw Actor. A Controller resolves to Pawn before the Pawn-class filter is applied.
Verification and troubleshooting
Symptom | Check |
|---|---|
No text at all | Editor/debug-drawing build condition and both CVars are 1. |
State enters but nothing appears | |
Bound Controller does not display | It has a current Pawn and the Pawn is not excluded by the class filter. |
Wrong text position | Adjust |
Text remains after exit | StateTree really called ExitState, or another state text is still active. |
Use GameplayDebugger for system snapshots and Visual Logger for per-Tactical-Source production detail. Debug Overlay only draws local StateTree state text.
