AActor::SetActorIsPendingPostNetInit
#include "GameFramework/Actor.h"
Access: public
Description
Sets the internal flag that tracks whether this actor is still pending its `PostNetInit` phase after initial network replication. Intended for use only by `UNetActorFactory`.
Caveats & Gotchas
- • The header comment explicitly states this should only be called by `UNetActorFactory`. Calling it from gameplay code is unsupported and can desynchronize the engine's post-net-init tracking, leading to actors being stuck in an uninitialized state or skipping initialization callbacks.
- • This flag gates the `PostNetInit` call that runs component registration and Blueprint construction for net-startup actors on clients. Misuse can cause components to be permanently unregistered on client instances.
Signature
void SetActorIsPendingPostNetInit(bool bInIsPendingPostNetInit) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bInIsPendingPostNetInit | bool | Whether this actor is still waiting for its PostNetInit call to complete. | — |
Return Type
void Example
Engine usage context (do not call directly) C++
// Called internally by UNetActorFactory during actor channel setup:
// Actor->SetActorIsPendingPostNetInit(true);
// ... after initial bunch is processed ...
// Actor->SetActorIsPendingPostNetInit(false);
// Actor->PostNetInit();
// Do NOT call this from your own gameplay code. See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?