RealDocs

UActorComponent::OnAsyncCreatePhysicsStateEnd_GameThread

function Engine Since unknown
#include "Components/ActorComponent.h"
Access: public Specifiers: virtualoverride

Description

Called on the game thread after OnAsyncCreatePhysicsState returns true, signalling that async physics construction is complete. Override to perform any game-thread-only finalization after bodies are built.

Caveats & Gotchas

  • This is the only safe place to update UObject state or call game-thread-only engine APIs after async physics creation; do not attempt these in OnAsyncCreatePhysicsState itself.
  • The base class implementation sets the bPhysicsStateCreated flag and fires the bCallAsyncPhysicsStateCreatedDelegate notification; call Super::OnAsyncCreatePhysicsStateEnd_GameThread() first or these flags will not be set correctly.

Signature

ENGINE_API virtual void OnAsyncCreatePhysicsStateEnd_GameThread() override;

Return Type

void

Example

Post-creation game-thread finalization C++
void UMyBulkPhysicsComponent::OnAsyncCreatePhysicsStateEnd_GameThread()
{
    Super::OnAsyncCreatePhysicsStateEnd_GameThread();
    // Safe to touch UObjects now
    OnPhysicsReady.Broadcast();
    SetComponentTickEnabled(true);
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.