RealDocs

AActor::PostUnregisterAllComponents

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: virtual

Description

Called after all currently registered components have been unregistered. Override to perform cleanup that must happen once every component has been detached from the world.

Caveats & Gotchas

  • This is a virtual hook specifically for subclasses; the base AActor implementation does nothing, so you do not need to call Super unless an intermediate base class overrides it.
  • At this point components still exist in memory — only their world registration has been removed. Do not assume the actor is being destroyed.

Signature

ENGINE_API virtual void PostUnregisterAllComponents();

Return Type

void

Example

Override to clean up world-registered resources C++
void AMyActor::PostUnregisterAllComponents()
{
    Super::PostUnregisterAllComponents();
    // Safe to clean up anything that depended on components being registered
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.