Quick answer: In your UReplicationGraph subclass, route the actor to the right node: GridSpatialization2D for distance-based, AlwaysRelevant for global, AlwaysRelevant_ForConnection for owner-only. Set NetCullDistanceSquared on the actor for the cull radius.
Server spawns an enemy. Some clients see it; one specific client doesn’t. The Replication Graph put it in a node the missing client doesn’t evaluate.
The Symptom
Actor replicates to most clients but not to a specific one. Or replicates only when the camera is very close. Console Net.RepGraph.PrintGraph shows the actor in an unexpected node.
The Mental Model
Replication Graph categorizes actors:
- AlwaysRelevant — replicate to every connection.
- GridSpatialization2D — replicate based on cell distance from each connection’s viewer.
- AlwaysRelevant_ForConnection — only the owning connection.
- Per-Class custom nodes — project-specific routing.
Place each class in its right node in your UReplicationGraph::InitGlobalActorClassSettings.
The Fix
void UMyReplicationGraph::InitGlobalActorClassSettings()
{
Super::InitGlobalActorClassSettings();
SetClassInfo(AEnemy::StaticClass(),
EClassRepNodeMapping::Spatialize_Dynamic);
SetClassInfo(AGameMode::StaticClass(),
EClassRepNodeMapping::NotRouted);
SetClassInfo(APlayerState::StaticClass(),
EClassRepNodeMapping::RelevantAllConnections);
SetClassInfo(AInventory::StaticClass(),
EClassRepNodeMapping::RelevantOwnerConnection);
}
Match category to actor:
- Movable enemies/projectiles → Spatialize_Dynamic.
- Static world geometry that replicates → Spatialize_Static.
- Always-needed (PlayerStates, GameState) → RelevantAllConnections.
- Owner-only (player’s inventory, HUD-driving actor) → RelevantOwnerConnection.
NetCullDistanceSquared
For Spatialize_* actors:
AEnemy::AEnemy()
{
NetCullDistanceSquared = 300 * 300 * 100 * 100; // in cm^2 (300m)
}
Larger value = visible at greater range. Tune per-class so big actors are seen from afar without flooding the network with small actors at distance.
Verifying
Server console: Net.RepGraph.PrintGraph 1. Print walks the graph for each connection. Confirm the missing actor appears in the right node for the right connection. If absent, your SetClassInfo is wrong.
“Right node, right cull. Replication Graph routes correctly.”
Related Issues
For GameplayTagContainer not replicating, see tag container. For physics constraint jitter, see constraint jitter.
Right node. Right cull. Clients see.