RealDocs

UActorComponent::IsNameStableForNetworking

function Engine Since 4.0
#include "Components/ActorComponent.h"
Access: public Specifiers: virtualoverride

Description

Returns whether this component's name is stable enough to be used for networked object identification. Components with stable names can be reliably referenced across server and client without extra tracking data.

Caveats & Gotchas

  • Returns true only when the component has a fixed, non-generated name — dynamically created components with auto-generated names will return false, causing them to require a separate net GUID.
  • If this returns false for a replicated component, the engine falls back to net GUID assignment, which adds overhead. Naming components explicitly at construction time can improve replication efficiency.

Signature

ENGINE_API virtual bool IsNameStableForNetworking() const override;

Return Type

bool

Example

Check name stability before replication logic C++
if (MyComponent->IsNameStableForNetworking())
{
    // Safe to reference by name on clients
    UE_LOG(LogNet, Log, TEXT("Component name is stable: %s"), *MyComponent->GetName());
}
else
{
    UE_LOG(LogNet, Warning, TEXT("Component will use net GUID instead of name"));
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.