RealDocs

UBehaviorTreeComponent::ScheduleExecutionUpdate

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

Description

Flags the component to process its pending execution flow update on the next tick instead of running it immediately. Used internally so that multiple execution requests within the same frame collapse into a single flow update.

Caveats & Gotchas

  • Calling this does not change the active node synchronously — the actual search and node transition happens later, inside ProcessExecutionRequest.
  • Game code almost never needs to call this directly; RequestExecution, RequestBranchEvaluation, and RequestBranchActivation already schedule the update for you.

Signature

void ScheduleExecutionUpdate()

Return Type

void

Example

Forcing a deferred flow update from a custom node C++
void UBTTask_MyCustomTask::WakeUpAndReevaluate(UBehaviorTreeComponent& OwnerComp)
{
    // Something external changed state; ask the tree to re-run its flow update next tick
    OwnerComp.ScheduleExecutionUpdate();
}

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.