UActorComponent::OnAsyncDestroyPhysicsStateBegin_GameThread
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtualoverride
Description
Called on the game thread immediately before async physics state destruction begins. Use this to prepare any game-thread state that the async destroy pass will need.
Caveats & Gotchas
- • Always call Super::OnAsyncDestroyPhysicsStateBegin_GameThread() when overriding — the base implementation notifies registered physics state listeners.
- • This is guaranteed to run on the game thread, unlike OnAsyncDestroyPhysicsState itself which runs off-thread.
- • Avoid heavy work here; this runs synchronously before handing off to the async pipeline.
Signature
ENGINE_API virtual void OnAsyncDestroyPhysicsStateBegin_GameThread() override; Return Type
void Example
Prepare game-thread data before async physics teardown C++
void UMyPhysicsComponent::OnAsyncDestroyPhysicsStateBegin_GameThread()
{
Super::OnAsyncDestroyPhysicsStateBegin_GameThread();
// Cache any data the async pass will need while still on game thread
CachedBodySetup = BodySetupRef.Get();
} See Also
Version History
Introduced in: 5.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?