UActorComponent::OnPreEndOfFrameSync
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtual
Description
Override to perform work — including awaiting async tasks — immediately before the engine sends end-of-frame update data. Runs on the Game Thread and may co-await outstanding tasks.
Caveats & Gotchas
- • This is called only when the component has been marked for pre-end-of-frame sync by the engine (bMarkedForPreEndOfFrameSync must be set). You cannot self-register for this callback directly from game code without engine-level integration.
- • The callback runs after the final tick but before render commands for the frame are submitted; any state mutations here must be thread-safe with respect to the render thread if render state is involved.
Signature
virtual void OnPreEndOfFrameSync() {} Return Type
void Example
Flushing async data before frame end C++
// Override in a component that collects async sensor data each frame:
void UMySensorComponent::OnPreEndOfFrameSync()
{
// Wait for async sensor readback, then apply to state
AsyncReadbackHandle.WaitForCompletion();
ApplySensorData(AsyncReadbackHandle.GetResult());
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?