RealDocs

UActorComponent::ReregisterComponent

function Engine Since 4.0
#include "Components/ActorComponent.h"
Access: public

Description

Unregisters the component and immediately re-registers it, rebuilding its render and physics state from scratch. Use this to force the engine to pick up property changes that are not applied incrementally.

Caveats & Gotchas

  • This is a relatively expensive call — it tears down and recreates render proxies. Do not call it every frame; batch property changes and re-register once.
  • On components with a render state (e.g. UPrimitiveComponent), re-registration enqueues render-thread commands, so the visual update may not be visible until the next rendered frame.

Signature

ENGINE_API void ReregisterComponent()

Return Type

void

Example

Forcing a component to pick up new material assignments C++
MeshComponent->SetStaticMesh(NewMesh);
// Some mesh/material changes require a re-register to take effect at runtime
MeshComponent->ReregisterComponent();

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.