RealDocs

UActorComponent::IsAsyncDestroyPhysicsStateRunning

function Engine Since 5.0
#include "Components/ActorComponent.h"
Access: public Specifiers: const

Description

Returns true if the component is currently in the process of asynchronously destroying its physics state on a background scene.

Caveats & Gotchas

  • Attempting to recreate physics state while async destruction is in flight will result in a no-op or assert — wait until this returns false.
  • Like IsAsyncCreatePhysicsStateRunning, this only applies to components participating in async physics scenes. Standard synchronous physics components always return false.

Signature

bool IsAsyncDestroyPhysicsStateRunning() const

Return Type

bool

Example

Defer component re-activation until async destroy finishes C++
void UMyComponent::OnReactivate()
{
	if (IsAsyncDestroyPhysicsStateRunning())
	{
		// Schedule retry on next tick
		GetWorld()->GetTimerManager().SetTimerForNextTick(this, &UMyComponent::OnReactivate);
		return;
	}
	CreatePhysicsState();
}

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.