UActorComponent::AllowReregistration
#include "Components/ActorComponent.h"
Access: public
Specifiers: inline
Description
Returns whether this component class permits automatic reregistration during `ReregisterAllComponents` calls (typically triggered by live editing or component reconstruction). Controlled by the `bAllowReregistration` protected flag.
Caveats & Gotchas
- • The `bAllowReregistration` flag is protected and must be set in a subclass constructor to opt out. Once set to false, the component will be silently skipped during world reregistration passes, which can cause it to appear as if editor changes have no effect.
- • This only affects batch reregistration (e.g. `ReregisterAllComponents`) — individual `RegisterComponent`/`UnregisterComponent` calls ignore this flag.
Signature
inline bool AllowReregistration() const { return bAllowReregistration; } Return Type
bool Example
Disable reregistration in a specialized component C++
UMySpecialComponent::UMySpecialComponent()
{
// Prevent this component from being torn down and rebuilt
// during editor reconstruction passes
bAllowReregistration = false;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?