AActor::SetHasActorRegisteredAllComponents
#include "GameFramework/Actor.h"
Access: public
Specifiers: inline
Description
Sets the internal bHasRegisteredAllComponents flag to true. Must be called immediately before PostRegisterAllComponents() to put the actor into a consistent state.
Caveats & Gotchas
- • This is an engine-internal housekeeping call — game code almost never needs to invoke it directly. Calling it at the wrong time can leave the actor in an inconsistent state where HasActorRegisteredAllComponents() returns true but components are not actually registered.
- • There is no matching 'clear' overload; the flag is reset to false inside PostUnregisterAllComponents(), which is called by the engine automatically.
Signature
void SetHasActorRegisteredAllComponents() { bHasRegisteredAllComponents = true; } Return Type
void Example
Typical engine-side usage pattern C++
// As done by the engine before calling PostRegisterAllComponents:
void AActor::RegisterAllComponents()
{
// ... register each component ...
SetHasActorRegisteredAllComponents();
PostRegisterAllComponents();
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?