AActor::HasDeferredComponentRegistration
#include "GameFramework/Actor.h"
Access: public
Specifiers: inline
Description
Returns true if RegisterAllComponents() was deferred at spawn time because the Blueprint SCS had not yet executed to establish the root component.
Caveats & Gotchas
- • This flag is only true during the narrow window between SpawnActor and the SCS execution that produces the root component. Once RegisterAllComponents() runs, the flag resets to false — polling it after that window is meaningless.
- • C++-only actors with native root components never have deferred registration; this flag is relevant almost exclusively to Blueprint actors spawned in C++ via SpawnActor.
Signature
inline bool HasDeferredComponentRegistration() const { return bHasDeferredComponentRegistration; } Return Type
bool Example
Guard against accessing components during deferred spawn C++
AActor* Spawned = GetWorld()->SpawnActor<AActor>(MyBlueprintClass, SpawnTransform);
if (Spawned && !Spawned->HasDeferredComponentRegistration())
{
// Components are fully registered; safe to query
UActorComponent* Comp = Spawned->FindComponentByClass<UActorComponent>();
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?