RealDocs

UBehaviorTreeComponent::DescribeSelfToVisLog

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

Description

Writes a summary of the tree's current state (active tasks, running trees) into the given Visual Logger snapshot so it shows up when replaying the log in the Visual Logger tool.

Caveats & Gotchas

  • Only compiled when ENABLE_VISUAL_LOG is set — absent entirely in Shipping/Test builds where the Visual Logger is disabled.
  • Called automatically by the Visual Logger system each time it captures a snapshot for this actor; you don't need to invoke it yourself, just make sure Visual Logger recording is enabled.

Signature

virtual void DescribeSelfToVisLog(struct FVisualLogEntry* Snapshot) const override

Parameters

Name Type Description Default
Snapshot struct FVisualLogEntry* Visual Logger entry to append this component's status text to.

Return Type

void

Example

Visual Logger picking up behavior tree state automatically C++
// No direct call needed — once Visual Logger recording is active,
// UBehaviorTreeComponent::DescribeSelfToVisLog runs automatically each capture.
UE_VLOG(GetOwner(), LogBehaviorTree, Log, TEXT("Requesting a snapshot"));

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.