UActorComponent::AllowsAsyncPhysicsStateDestruction
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtual
Description
Override to return true to allow this component's physics state to be torn down on a background physics thread. Counterpart to AllowsAsyncPhysicsStateCreation.
Caveats & Gotchas
- • If you return true, OnAsyncDestroyPhysicsState will be called from a non-game thread; all teardown work inside must not touch game-thread-only objects such as UObjects without going through a task graph dispatch.
- • Async destruction is only initiated from DestroyPhysicsState; the engine does not automatically choose async teardown — it must reach the right code path via the physics scene's job queue.
Signature
virtual bool AllowsAsyncPhysicsStateDestruction() const
{
return false;
} Return Type
bool Example
Symmetric async teardown alongside async creation C++
bool UMyComplexPhysicsComponent::AllowsAsyncPhysicsStateDestruction() const
{
// Match the creation policy — if we created async, tear down async
return AllowsAsyncPhysicsStateCreation();
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?