UBehaviorTreeComponent::GetTaskStatus
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Specifiers: const
Description
Returns the current runtime status of the given task node — Active, Aborting, or Inactive. Commonly used from parallel tasks or services that need to check on another task's progress.
Caveats & Gotchas
- • Only meaningful for a task that is part of the currently running instance stack — querying a node from a different or no-longer-running tree returns Inactive.
- • The status reflects the engine's bookkeeping, not the task's own EBTNodeResult; a task can be Aborting for several frames while it finishes a latent abort.
Signature
EBTTaskStatus::Type GetTaskStatus(const UBTTaskNode* TaskNode) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TaskNode | const UBTTaskNode* | Task node to query the current status of. | — |
Return Type
EBTTaskStatus::Type Example
Checking whether a parallel task is still active C++
if (OwnerComp.GetTaskStatus(OtherTaskNode) == EBTTaskStatus::Active)
{
// The other parallel task is still running
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?