RealDocs

UActorComponent::IsPreUnregistering

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

Description

Returns true while this component is transitioning through the pre-unregistering phase — `UnregisterComponent` has been initiated but render and physics teardown has not yet completed.

Caveats & Gotchas

  • During this state, the component's render proxy may still be alive. Do not assume any rendering resources have been released just because this returns true.
  • Callbacks like `OnUnregister` are called during this state — accessing world subsystems from those callbacks is safe, but the component should be considered functionally deactivated.

Signature

inline bool IsPreUnregistering() const

Return Type

bool

Example

Guard teardown code against double-unregister C++
void UMyComponent::BeginCleanup()
{
    if (IsPreUnregistering() || !IsRegistered())
    {
        return;  // Already tearing down
    }
    UnregisterComponent();
}

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.