UBehaviorTreeComponent::DescribeActiveTrees
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Specifiers: virtualconst
Description
Returns a string listing the behavior tree assets running on the instance stack, from the root tree down through any pushed dynamic subtrees.
Caveats & Gotchas
- • Returns an empty-ish/placeholder string when the instance stack is empty rather than asserting — safe to call on a stopped component.
- • Useful for spotting runaway subtree pushes (e.g. a misbehaving RunBehaviorDynamic task) during debugging, since each pushed subtree adds an entry.
Signature
virtual FString DescribeActiveTrees() const Return Type
FString Example
Logging the full subtree stack C++
UE_LOG(LogBehaviorTree, Log, TEXT("Active trees: %s"), *BTComponent->DescribeActiveTrees()); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?