RealDocs

UBehaviorTreeComponent::GetDebugInfoString

function AIModule Since 4.0
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public Specifiers: virtualconstoverride

Description

Returns a human-readable summary of the brain component's current state, overriding UBrainComponent's base implementation with behavior-tree-specific details such as the active tree and current task.

Caveats & Gotchas

  • Intended for debug HUDs and logging (e.g. the AI debugger overlay) — the exact string format is not stable across engine versions and shouldn't be parsed programmatically.
  • Builds the string by walking the instance stack each call, so avoid calling it every frame outside of debug/editor tooling.

Signature

virtual FString GetDebugInfoString() const override

Return Type

FString

Example

Printing brain state to the AI debug overlay C++
const FString DebugInfo = BTComponent->GetDebugInfoString();
DisplayDebugManager.DrawString(DebugInfo);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.