RealDocs

UBehaviorTreeComponent::UnregisterParallelTask

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

Description

Removes a task from the internal list of active parallel tasks, undoing a prior RegisterParallelTask call.

Caveats & Gotchas

  • Called internally when a parallel task finishes or its owning branch is deactivated — not typically called from gameplay or custom task code.
  • InstanceIdx must match the instance the task was registered under, since the same task class can run concurrently in different subtree instances.

Signature

void UnregisterParallelTask(const UBTTaskNode* TaskNode, uint16 InstanceIdx);

Parameters

Name Type Description Default
TaskNode const UBTTaskNode* Task to remove from the active parallel task list.
InstanceIdx uint16 Tree instance index the task belongs to.

Return Type

void

Example

Internal cleanup after a parallel task finishes C++
// Called by the tree once a parallel background task completes
OwnerComp.UnregisterParallelTask(ParallelTaskNode, InstanceIdx);

Tags

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.