RealDocs

UActorComponent::ShouldIncrementalPreUnregister

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

Description

Returns whether PreUnregisterComponentFromWorld should be called for this component when its level is being removed from the world incrementally. Pair with ShouldIncrementalPreRegister to balance registration with unregistration.

Caveats & Gotchas

  • If you return true here without also returning true from ShouldIncrementalPreRegister, the component will attempt incremental unregistration even if incremental registration never ran — ensure both overrides are symmetric.
  • The incremental unregistration path runs on the level-removal timeline (e.g. during level unloading), not during normal component destruction; do not rely on this being called for components destroyed at runtime via DestroyComponent.

Signature

ENGINE_API virtual bool ShouldIncrementalPreUnregister() const;

Return Type

bool

Example

Symmetric opt-in for incremental streaming C++
bool UMyHeavyComponent::ShouldIncrementalPreUnregister() const
{
    return true; // Mirror ShouldIncrementalPreRegister
}

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.