RealDocs

AActor::ReregisterAllComponents

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

Description

Unregisters then re-registers all components on this actor. This is a heavy operation intended primarily for editor workflows — in game code prefer UpdateComponentTransforms or MarkComponentsRenderStateDirty for specific updates.

Caveats & Gotchas

  • This function is explicitly documented in the source as expensive; using it at runtime (especially on many actors per frame) will cause significant hitches.
  • Calling this in-game can invalidate cached render state and physics proxies for every component, which may cause one-frame visual artifacts.

Signature

ENGINE_API virtual void ReregisterAllComponents();

Return Type

void

Example

Editor-time reregister after structural change C++
#if WITH_EDITOR
void AMyActor::OnEditorPropertyChanged()
{
    ReregisterAllComponents();
}
#endif

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.