UBehaviorTreeComponent::IsRunning
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Specifiers: virtualconstoverride
Description
Returns true if the behavior tree logic is currently active and processing execution requests. False before StartTree is called or after StopTree completes.
Caveats & Gotchas
- • Still returns true while the tree is paused — use IsPaused() alongside it to distinguish a genuinely halted tree from one that's just suspended.
- • Overrides UBrainComponent::IsRunning, so code written against a generic BrainComponent pointer gets the same answer without needing a UBehaviorTreeComponent cast.
Signature
virtual bool IsRunning() const override; Return Type
bool Example
Check tree state via the base BrainComponent pointer C++
if (AIController->GetBrainComponent() && AIController->GetBrainComponent()->IsRunning())
{
// Behavior tree logic is active
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?