RealDocs

UBehaviorTreeComponent::RequestBranchDeactivation

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

Description

Requests that the branch guarded by the given decorator be deactivated. Replaces the deprecated RequestUnregisterAuxNodesInBranch.

Caveats & Gotchas

  • Paired with RequestBranchActivation for decorators using observer aborts — the decorator calls this when its condition transitions from true to false while its branch is active.
  • Superseded RequestUnregisterAuxNodesInBranch, deprecated since UE 5.0; use this in new code instead.

Signature

void RequestBranchDeactivation(const UBTDecorator& RequestedBy);

Parameters

Name Type Description Default
RequestedBy const UBTDecorator& Decorator whose branch should be deactivated because its condition stopped passing.

Return Type

void

Example

Deactivate a branch when a decorator's condition stops passing C++
OwnerComp.RequestBranchDeactivation(*this);

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.