AActor::NetPriority
#include "GameFramework/Actor.h"
Access: public
Specifiers: UPROPERTYBlueprintReadWrite
Description
A weight used to prioritise this actor for replication when bandwidth is limited or the replication list is saturated. Higher values mean the actor is more likely to replicate in a given tick.
Caveats & Gotchas
- • NetPriority is only a hint to the replication scheduler — it does not guarantee that the actor will replicate every tick. Actors with `bAlwaysRelevant = true` still compete with other always-relevant actors on priority.
- • The default value varies by class (e.g. Pawn defaults are higher than static props). Overriding `GetNetPriority()` gives finer-grained dynamic control (e.g. boosting priority when the actor is on screen).
- • Very high priorities can starve lower-priority actors in high-actor-count scenarios. Tune this value against your replication budget rather than simply setting it to a large number.
Signature
UPROPERTY(Category=Replication, EditDefaultsOnly, BlueprintReadWrite)
float NetPriority; Example
Raise NetPriority for an important gameplay actor C++
AMyImportantActor::AMyImportantActor()
{
bReplicates = true;
NetPriority = 3.0f; // Default is 1.0f for AActor
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?