UActorComponent::IsAsyncPhysicsStateCreated
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtualoverride
Description
Returns true when the async physics state creation job has completed and the physics state is fully live. Part of the IAsyncPhysicsStateProcessor interface, marked final so it cannot be further overridden.
Caveats & Gotchas
- • Returns false even while async creation is still in flight; you cannot use this as a progress indicator — it only flips to true after OnAsyncCreatePhysicsStateEnd_GameThread has fired.
- • Because it is final, this cannot be overridden in subclasses; the engine controls the flag through its async job state machine. Do not call this before the component is registered.
Signature
ENGINE_API virtual bool IsAsyncPhysicsStateCreated() const override final; Return Type
bool Example
Waiting for async physics before applying an impulse C++
void UMyPhysicsComponent::TryApplyInitialImpulse()
{
if (!IsAsyncPhysicsStateCreated())
{
// Not ready yet — defer via timer or tick
return;
}
GetBodyInstance()->AddImpulse(InitialImpulse);
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?