RealDocs

UBehaviorTreeComponent::UnregisterAuxNodesInBranch

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

Description

Unregisters all auxiliary nodes (decorators and services) attached anywhere under the given composite node's branch. Replaces the deprecated RequestUnregisterAuxNodesInBranch.

Caveats & Gotchas

  • When bApplyImmediately is false, the unregistration is deferred as a pending branch action and only takes effect once ResumeBranchActions runs — useful when called from code that's currently suspending branch actions.
  • Superseded RequestUnregisterAuxNodesInBranch, deprecated since UE 5.0.

Signature

void UnregisterAuxNodesInBranch(const UBTCompositeNode* Node, bool bApplyImmediately = true);

Parameters

Name Type Description Default
Node const UBTCompositeNode* Root of the branch whose aux nodes (decorators/services) should be unregistered.
bApplyImmediately bool If true, unregisters right away; if false, the request is queued until branch actions are resumed via ResumeBranchActions. true

Return Type

void

Example

Unregister all aux nodes under a branch C++
OwnerComp.UnregisterAuxNodesInBranch(BranchRootNode, /*bApplyImmediately=*/true);

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.