UActorComponent::IsNetStartupComponent
#include "Components/ActorComponent.h"
Access: public
Specifiers: const
Description
Returns true if this component was owned by a net startup actor during level load. Net startup components can be reliably referenced by name across the network.
Caveats & Gotchas
- • This flag is set by the engine during ULevel::InitializeNetworkActors and should never be set manually by game code — use SetIsNetStartupComponent only if you are writing engine-level initialization code.
- • Only components on net startup actors (actors placed in the level at edit time that replicate) have this set to true. Dynamically spawned actors and their components will always return false.
Signature
bool IsNetStartupComponent() const { return bIsNetStartupComponent; } Return Type
bool Example
Check if a component is a net startup component C++
if (MyComponent->IsNetStartupComponent())
{
// Component is addressable by name on clients — safe to reference by stable name
UE_LOG(LogNet, Verbose, TEXT("%s is a net startup component"), *MyComponent->GetName());
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?