UBehaviorTreeComponent::TickComponent
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Specifiers: virtualoverride
Description
Drives execution flow processing and ticks active tasks/services/decorators for the running behavior tree each frame. This is the component's per-frame heartbeat.
Caveats & Gotchas
- • Actual per-node ticking can be throttled by ScheduleNextTick and interval decorators — not every node runs logic on every call.
- • Do not call this directly; it is invoked by the actor component tick system based on the component's registered tick function.
- • Ticking can be entirely skipped for a frame if ScheduleNextTick requested a longer delay, so GetAccumulatedTickDeltaTime should be used inside nodes rather than assuming a fixed DeltaTime.
Signature
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaTime | float | Time in seconds since the last tick. | — |
| TickType | enum ELevelTick | The kind of tick being performed (e.g. viewports-only vs all). | — |
| ThisTickFunction | FActorComponentTickFunction* | The tick function invoking this call. | — |
Return Type
void Example
Behavior tree ticking is automatic C++
// TickComponent runs automatically once the component is registered and ticking is enabled;
// game code typically never calls it directly.
BehaviorTreeComponent->SetComponentTickEnabled(true); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?