AActor::TickActor
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualENGINE_API
Description
The internal dispatcher called by the PrimaryActorTick function each frame. It checks conditions (paused, pending kill, tick type) and delegates to Tick(). Rarely overridden by game code.
Caveats & Gotchas
- • Override Tick() for per-frame logic, not TickActor(). TickActor handles the pre-conditions — if you override it without calling Super, you must replicate all the guard checks (paused state, LEVELTICK_ViewportsOnly handling, etc.) yourself.
- • ThisTickFunction.GetCompletionHandle() can be used inside this function to set up tasks that must finish before this actor's tick is considered done (useful for async work tied to the tick).
- • TickType is not always LEVELTICK_All — in editor viewport preview, it may be LEVELTICK_ViewportsOnly. ShouldTickIfViewportsOnly() controls whether the actor ticks in that mode.
Signature
ENGINE_API virtual void TickActor( float DeltaTime, enum ELevelTick TickType, FActorTickFunction& ThisTickFunction ); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaTime | float | Time elapsed since the last tick. | — |
| TickType | enum ELevelTick | The type of tick (e.g. LEVELTICK_All, LEVELTICK_ViewportsOnly). Controls which actors should tick. | — |
| ThisTickFunction | FActorTickFunction& | The tick function object that triggered this call; useful for adding completion prerequisites. | — |
Return Type
void Example
Override Tick, not TickActor C++
// Correct: override Tick for per-frame logic
void AMyActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
// Your logic here
}
// TickActor() calls Tick() after validating conditions;
// you rarely need to override it. See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?