AActor::RegisterAllActorTickFunctions
#include "GameFramework/Actor.h"
Access: public
Specifiers: ENGINE_API
Description
Registers or unregisters all tick functions for this actor and optionally its components with the world's tick task manager. Called by the engine during actor registration and deregistration.
Caveats & Gotchas
- • Do not override this function — the header comment explicitly states it must not be made virtual. Override RegisterActorTickFunctions() instead if you need to register additional custom tick functions.
- • Calling this manually without understanding the actor's component registration lifecycle can leave tick functions in an inconsistent state, causing ticks to fire after components are unregistered or not fire at all.
- • The bDoComponents flag only affects components that are already registered. Components added or removed after this call need their own tick functions re-registered separately.
Signature
ENGINE_API void RegisterAllActorTickFunctions(bool bRegister, bool bDoComponents); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bRegister | bool | True to register tick functions, false to unregister them. | — |
| bDoComponents | bool | Whether to also apply the registration change to all owned components. | — |
Return Type
void Example
Custom tick function registration via override C++
// Override RegisterActorTickFunctions (not RegisterAllActorTickFunctions)
void AMyActor::RegisterActorTickFunctions(bool bRegister)
{
Super::RegisterActorTickFunctions(bRegister);
if (bRegister)
{
MySecondaryTickFunction.Target = this;
MySecondaryTickFunction.RegisterTickFunction(GetLevel());
}
else
{
MySecondaryTickFunction.UnRegisterTickFunction();
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?