UBehaviorTreeComponent::RequestBranchEvaluation
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Description
Requests a new execution search starting from the given decorator's branch, used when a decorator's condition changes outside the tree's normal tick, e.g. an observed blackboard value changes.
Caveats & Gotchas
- • A second overload takes an EBTNodeResult::Type instead and is the one used internally when a task finishes — call the decorator overload from decorator code and let tasks report through OnTaskFinished instead.
- • This replaces the older RequestExecution(const UBTDecorator*) overload, which just forwards here.
Signature
void RequestBranchEvaluation(const UBTDecorator& RequestedBy); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| RequestedBy | const UBTDecorator& | Decorator whose changed condition should trigger a new execution search. | — |
Return Type
void Example
Trigger evaluation from a decorator's observer callback C++
void UBTDecorator_HasTarget::OnBlackboardValueChanged(UBehaviorTreeComponent& OwnerComp)
{
OwnerComp.RequestBranchEvaluation(*this);
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?