class

BTNode

Module
AINavigation
Header
#include "AINavigation/BehaviorTree.h"
Namespace
Mowo

Constructors

SignatureNameDescription
virtual ~BTNode() = default~BTNode

Public functions

ReturnsNameDescription
EBTStatusExecuteEnter-on-fresh + Tick + reset-on-terminal.
boolIsRunning
voidAbortIfRunningCancels an abandoned Running subtree: aborts the running children first, then runs OnAbort and clears the running flag, so the next Execute is a fresh entry (OnEnter runs, per-entry state resets).
EBTFlowAbortModeGetAbortModeObserver contract, honoured by the enclosing Selector.
boolEvaluateCondition
voidCollectObservedKeysBlackboard keys whose change can flip this node's condition.
voidVisitChildrenPublic face of ForEachChild for walks that are not aborts (observer collection, debugging).
voidSetDebugNodeIndex
int32_tGetDebugNodeIndex

Function details

~BTNode

C++
virtual ~BTNode() = default

Execute

C++
EBTStatus Execute(BTContext& ctx)

Enter-on-fresh + Tick + reset-on-terminal. A node entered last tick that returned Running is NOT re-entered (OnEnter skipped) so it can resume.

IsRunning

C++
bool IsRunning() const

AbortIfRunning

C++
void AbortIfRunning(BTContext& ctx)

Cancels an abandoned Running subtree: aborts the running children first, then runs OnAbort and clears the running flag, so the next Execute is a fresh entry (OnEnter runs, per-entry state resets). A node that is not running is left alone. Call it wherever a branch stops being ticked — a gate decorator that starts failing, a composite restarting from 0, a parallel whose main task finished.

GetAbortMode

C++
virtual EBTFlowAbortMode GetAbortMode() const

Observer contract, honoured by the enclosing Selector. A gate decorator reports the mode it was authored with and whether its condition passes right now; everything else opts out.

EvaluateCondition

C++
virtual bool EvaluateCondition(BTContext&) const

CollectObservedKeys

C++
virtual void CollectObservedKeys(std::vector<FName>&) const

Blackboard keys whose change can flip this node's condition. A tree collects them from every node with an abort mode, so a throttled tree wakes the frame one of them changes (UE's blackboard observers) instead of finding out on its next scheduled tick.

VisitChildren

C++
void VisitChildren(const std::function<void(BTNode&)>& fn)

Public face of ForEachChild for walks that are not aborts (observer collection, debugging).

SetDebugNodeIndex

C++
void SetDebugNodeIndex(int32_t index)

GetDebugNodeIndex

C++
int32_t GetDebugNodeIndex() const
Generated from AINavigation/BehaviorTree.h via ainavigation.json · Oct 27, 2026Version 1.0.0