UActorComponent::SetTickGroup
#include "Components/ActorComponent.h"
Access: public
Specifiers: ENGINE_APIUFUNCTIONBlueprintCallable
Description
Changes which tick group this component's primary tick function belongs to, controlling when in the frame it executes relative to physics and other systems.
Caveats & Gotchas
- • Tick groups define ordering within a frame: TG_PrePhysics → TG_DuringPhysics → TG_PostPhysics → TG_PostUpdateWork. Moving to TG_PostPhysics when you previously read physics state is a common fix for one-frame lag.
- • Changing the tick group at runtime takes effect on the next tick registration cycle; the current frame is not affected.
- • Components set to TG_DuringPhysics tick while the physics simulation is running in a thread — avoid writing to physics bodies directly from this group.
Signature
ENGINE_API void SetTickGroup(ETickingGroup NewTickGroup); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| NewTickGroup | ETickingGroup | The tick group to assign this component's primary tick function to. | — |
Return Type
void Example
Move component to post-physics tick group C++
void UMyComponent::BeginPlay()
{
Super::BeginPlay();
// Read physics results after simulation completes
SetTickGroup(TG_PostPhysics);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?