Networking & Replication
Unreal Engine's networking model — replication of properties and Actors, RPCs, server authority, relevancy, dormancy, and the Replication Graph.
21 questions
JuniorTheoryVery commonWhat is a replicated property in Unreal, and how does it keep state in sync?
What is a replicated property in Unreal, and how does it keep state in sync?
A replicated property is a variable marked with the Replicated specifier so the server pushes its value to clients. The server owns it; when it changes, the engine syncs it to relevant clients automatically.
Common mistakes
- ✗Trying to change a replicated property on the client and expecting it to stick
- ✗Forgetting to add the property to
GetLifetimeReplicatedProps - ✗Confusing a replicated property with a
MulticastRPC
Follow-up questions
- →What does a
RepNotify(ReplicatedUsing) function let you do? - →Why must a replicated property be registered in
GetLifetimeReplicatedProps?
JuniorTheoryVery commonWhat is an RPC (Remote Procedure Call) in Unreal networking?
What is an RPC (Remote Procedure Call) in Unreal networking?
An RPC is a function marked with a network specifier that runs on a different machine than the caller. Server RPCs go Client→Server, Client RPCs go Server→owning Client, and Multicast RPCs run everywhere.
Common mistakes
- ✗Confusing RPCs (events/calls) with replicated properties (state sync)
- ✗Forgetting a
ServerRPC must be called from the actor's owning client - ✗Expecting a
MulticastRPC to reach clients that are not connected yet
Follow-up questions
- →What is the difference between a reliable and an unreliable RPC?
- →Why does a
ServerRPC require ownership to actually execute?
JuniorTheoryVery commonWhat is replication in Unreal Engine, and what problem does it solve?
What is replication in Unreal Engine, and what problem does it solve?
Replication is Unreal's networking mechanism that synchronizes Actor state from the authoritative server to connected clients. It mirrors marked properties and routes RPCs, keeping every client's world consistent with the server.
Common mistakes
- ✗Thinking replication is peer-to-peer rather than server-authoritative
- ✗Assuming every property replicates automatically without markup
- ✗Confusing replication with local save/load serialization
Follow-up questions
- →What is the difference between replicating a property and sending an RPC?
- →Why must an Actor have
bReplicatesset true to participate in replication?
JuniorTheoryCommonWhat does the bReplicates flag do, and why does an Actor need it?
What does the bReplicates flag do, and why does an Actor need it?
bReplicates enables an Actor for networking. When true, the server spawns and tracks the Actor on relevant clients and processes its replicated properties. When false, the Actor exists only locally and never syncs.
Common mistakes
- ✗Expecting replicated properties to sync while
bReplicatesis false - ✗Thinking
bReplicatesis just an editor tag with no runtime effect - ✗Forgetting that a replicated Actor must be spawned on the server
Follow-up questions
- →What happens to RPCs called on an Actor whose
bReplicatesis false? - →How does
bReplicatesinteract with an Actor's relevancy and net update frequency?
MiddleTheoryCommonWhat is Actor ownership and why does it matter for RPCs?
What is Actor ownership and why does it matter for RPCs?
Ownership links an Actor to a Connection via its Owner chain up to a PlayerController. A Server RPC fires only if the calling client owns the Actor; a Client RPC reaches only the owning client. Without ownership those RPCs are dropped.
Common mistakes
- ✗Calling a
ServerRPC from an Actor the client does not own - ✗Thinking ownership is just the C++ creator pointer with no net role
- ✗Forgetting that ownership is resolved through the
Ownerchain to aPlayerController
Follow-up questions
- →How do you set ownership of an Actor so a specific client can call its
ServerRPCs? - →Why can a
PawncallServerRPCs but a world-placed prop usually cannot?
MiddleTheoryCommonWhat are common replication bugs in Unreal Engine projects?
What are common replication bugs in Unreal Engine projects?
Common bugs: changing replicated state on the client instead of the server, forgetting DOREPLIFETIME registration, calling RPCs from a non-owning Actor, using an RPC where late joiners need a property, and assuming OnRep fires on the server.
Common mistakes
- ✗Editing replicated state on the client and expecting it to stick
- ✗Forgetting
DOREPLIFETIME, so aReplicatedproperty never syncs - ✗Expecting an
OnRepcallback to run on the server automatically
Follow-up questions
- →How do you make initialization logic run on both the server and clients?
- →Why does a replicated property sometimes arrive before its Actor's
BeginPlay?
MiddleTheoryCommonWhat is the GetLifetimeReplicatedProps() function for?
What is the GetLifetimeReplicatedProps() function for?
GetLifetimeReplicatedProps() is where you register a class's replicated properties, usually via the DOREPLIFETIME macro. The engine calls it to learn which properties to track and lets you attach replication conditions per property.
Common mistakes
- ✗Thinking the function runs every tick rather than once during registration
- ✗Forgetting to call
Super::GetLifetimeReplicatedProps()inside the override - ✗Marking a
UPROPERTYasReplicatedbut never addingDOREPLIFETIME
Follow-up questions
- →How does
DOREPLIFETIME_CONDITIONdiffer from plainDOREPLIFETIME? - →What happens if you forget to call the
Superversion of the function?
MiddleDebuggingCommonWhy does a feature work in PIE single-player but break in multiplayer?
Why does a feature work in PIE single-player but break in multiplayer?
In single-player one machine is both server and client, so unreplicated state and client-side mutations just work. In multiplayer the server and clients are separate, exposing missing replication, wrong-authority writes, and ungated RPC calls. Here OnPickup has no authority guard, so a client destroys the item only locally, and Count is never registered for replication, so remote clients never see it change.
Common mistakes
- ✗Assuming code that works in PIE single-player is already network-correct
- ✗Writing gameplay state on the client because it appeared to work locally
- ✗Testing only with one player instead of PIE multiple-clients mode
Follow-up questions
- →How does PIE's multiple-clients mode help catch these bugs early?
- →Why is
HasAuthority()a key guard when porting single-player logic?
MiddleTheoryCommonHow do you replicate a health value across the network in Unreal?
How do you replicate a health value across the network in Unreal?
Mark Health as a UPROPERTY(ReplicatedUsing=OnRep_Health), register it in GetLifetimeReplicatedProps with DOREPLIFETIME, and modify it only on the server. The OnRep_Health callback updates the HUD on clients when the value arrives.
Common mistakes
- ✗Modifying
Healthon the client, which the server will simply overwrite - ✗Forgetting
DOREPLIFETIMEregistration so the property never replicates - ✗Using a per-frame RPC instead of letting property replication diff the value
Follow-up questions
- →How would you also play a damage effect exactly when health drops?
- →Why should damage application logic live on the server rather than the client?
MiddleTheoryCommonWhen should you use a replicated property versus an RPC?
When should you use a replicated property versus an RPC?
Use a replicated property for persistent state that any joining client must see — health, score. Use an RPC for one-off events that needn't persist — a hit sound, a muzzle flash. Properties sync state; RPCs deliver transient actions.
Common mistakes
- ✗Using an RPC for persistent state that late-joining clients will miss
- ✗Using a replicated property to fire a one-shot effect, causing missed or stale triggers
- ✗Thinking RPCs are resent to clients that join after the call
Follow-up questions
- →How can you build a reliable one-shot event using a replicated property and an
OnRepcallback? - →Why might a
NetMulticastRPC be a poor choice for state a late joiner must see?
MiddleTheoryCommonWhat are Server, Client, and NetMulticast RPCs in Unreal Engine?
What are Server, Client, and NetMulticast RPCs in Unreal Engine?
A Server RPC runs on the server, called by the owning client. A Client RPC runs on the owning client, called by the server. A NetMulticast RPC, called on the server, runs on the server and all relevant clients.
Common mistakes
- ✗Calling a
ServerRPC from a non-owning client and expecting it to fire - ✗Thinking a
NetMulticastRPC reaches clients when called on a client - ✗Confusing which machine is the caller and which is the executor
Follow-up questions
- →Why must a
NetMulticastRPC be called on the server to reach all clients? - →What determines whether a
ClientRPC reaches a particular player?
MiddleTheoryOccasionalWhat does Reliable mean for an RPC, and should every RPC be Reliable?
What does Reliable mean for an RPC, and should every RPC be Reliable?
A Reliable RPC is guaranteed to arrive and execute, retried until acknowledged. Not every RPC should be reliable: the reliable buffer is limited, and flooding it with frequent calls overflows it and drops the client. Use Unreliable for cosmetics.
Common mistakes
- ✗Marking high-frequency cosmetic RPCs
Reliableand overflowing the buffer - ✗Thinking
Reliableguarantees same-frame or ordered-with-properties delivery - ✗Believing reliability has no performance or bandwidth cost
Follow-up questions
- →What happens when the reliable RPC buffer overflows?
- →Why can't a
ReliableRPC guarantee ordering relative to replicated properties?
MiddleTheoryOccasionalHow do you replicate projectiles such as bullets or rockets in Unreal?
How do you replicate projectiles such as bullets or rockets in Unreal?
Spawn the projectile on the server as a replicated Actor; the engine creates it on relevant clients. Let ProjectileMovementComponent simulate motion locally on each side, and resolve hits and damage authoritatively on the server.
Common mistakes
- ✗Spawning the projectile on the client so the server never tracks it
- ✗Resolving hits and damage on the client instead of the server
- ✗Replicating the transform every tick instead of using local movement simulation
Follow-up questions
- →How does fake/cosmetic client-side projectile spawning improve perceived latency?
- →Why is server-side hit resolution important against cheating?
MiddleTheoryOccasionalWhat does the ReplicatedUsing specifier do on a UPROPERTY?
What does the ReplicatedUsing specifier do on a UPROPERTY?
ReplicatedUsing=OnRep_Func marks a property as replicated and names a callback. When the value changes on a client, the engine calls that OnRep function, letting you react — update UI, play effects — instead of just storing the new value.
Common mistakes
- ✗Thinking the
OnRepcallback also fires on the server by default - ✗Believing
ReplicatedUsingmakes the property replicate every frame - ✗Forgetting the property still needs
GetLifetimeReplicatedPropsregistration
Follow-up questions
- →Does the
OnRepfunction run on the server, and how do you trigger that logic there? - →Why might an
OnRepcallback not fire even though the value changed?
SeniorDebuggingOccasionalHow do you debug replication issues in an Unreal Engine project?
How do you debug replication issues in an Unreal Engine project?
A clean local PIE session has no latency or loss, so it hides the bug. Reproduce in PIE multi-client, then use Net PktLag/PktLoss to simulate bad networks, the showdebug net overlay, Net.DumpRelevantActors, and authority logging to confirm which machine writes state and whether the property is registered.
Common mistakes
- ✗Testing only on a perfect local network with zero latency or loss
- ✗Debugging on one machine and assuming the server side behaves identically
- ✗Never checking whether the property is actually registered for replication
Follow-up questions
- →What does
Net PktLagreveal that a clean local test cannot? - →How do you confirm a property is registered without reading the source?
SeniorTheoryOccasionalWhat is network relevancy in Unreal Engine, and how does it save bandwidth?
What is network relevancy in Unreal Engine, and how does it save bandwidth?
Relevancy is the per-connection decision of whether an Actor is replicated to a given client. The server skips irrelevant Actors — too far, not visible — saving bandwidth. IsNetRelevantFor and settings like NetCullDistanceSquared drive it.
Common mistakes
- ✗Thinking relevancy is global rather than evaluated per connection
- ✗Assuming relevancy is fixed at spawn and never re-evaluated
- ✗Confusing network relevancy with client-side rendering culling
Follow-up questions
- →How does
bAlwaysRelevantchange an Actor's replication behavior? - →How does relevancy interact with dormancy to reduce server cost?
SeniorTheoryRareWhat is network dormancy in Unreal Engine, and what does it save?
What is network dormancy in Unreal Engine, and what does it save?
Dormancy lets a replicated Actor stop being processed for replication while its state is static, saving server CPU. A dormant Actor is skipped each tick until you call FlushNetDormancy or set it awake to push a change.
Common mistakes
- ✗Thinking dormancy destroys the Actor rather than pausing its replication
- ✗Changing a dormant Actor's property without calling
FlushNetDormancy - ✗Assuming dormancy speeds up replication instead of skipping it
Follow-up questions
- →What goes wrong if you change a dormant Actor's state but forget to flush dormancy?
- →When is
DORM_Initialan appropriate dormancy setting?
SeniorDesignRareA multiplayer level has 100+ replicated actors — players, projectiles, pickups, and static decorations — with dozens of players connected. The dedicated server is CPU-bound on its networking loop: every tick it recomputes per-connection relevancy and diffs every actor's replicated properties, and bandwidth to each client is saturated. Most actors rarely change, and many are far from any given player. Describe how you would bring the per-tick networking cost down. Requirements: distant and irrelevant actors stop consuming send work for a given client; rarely-changing actors are not reconsidered every tick; only the properties a client actually needs are sent; and the approach must keep scaling as actor and player counts grow.
A multiplayer level has 100+ replicated actors — players, projectiles, pickups, and static decorations — with dozens of players connected. The dedicated server is CPU-bound on its networking loop: every tick it recomputes per-connection relevancy and diffs every actor's replicated properties, and bandwidth to each client is saturated. Most actors rarely change, and many are far from any given player. Describe how you would bring the per-tick networking cost down. Requirements: distant and irrelevant actors stop consuming send work for a given client; rarely-changing actors are not reconsidered every tick; only the properties a client actually needs are sent; and the approach must keep scaling as actor and player counts grow.
Cut per-tick work: tune NetUpdateFrequency and NetCullDistanceSquared, use dormancy for static actors, gate properties with DOREPLIFETIME_CONDITION, and adopt the Replication Graph for spatial culling at scale.
Common mistakes
- ✗Marking everything
bAlwaysRelevant, which defeats relevancy culling - ✗Leaving
NetUpdateFrequencyhigh for actors that rarely change - ✗Never using dormancy for static or idle actors, so the server keeps processing them every tick
Follow-up questions
- →How would you profile to confirm replication is the actual bottleneck?
- →What trade-off does lowering
NetUpdateFrequencyintroduce for fast-moving actors?
SeniorTheoryRareWhat is the Replication Graph in Unreal Engine and why does it exist?
What is the Replication Graph in Unreal Engine and why does it exist?
The Replication Graph is a scalable replication system that organizes Actors into spatial nodes and gathers per-connection lists from them. It exists because the default per-Actor relevancy loop costs too much CPU with many actors and players.
Common mistakes
- ✗Thinking the Replication Graph is an editor diagram tool
- ✗Believing it replaces the transport protocol rather than the relevancy loop
- ✗Assuming it mainly saves bandwidth rather than server CPU
Follow-up questions
- →What is a grid spatialization node and how does it scale with player count?
- →When is it worth migrating a project to the Replication Graph?