Syncing Server World to Client in Unity Netcode (v1.3)
William Jing

This guide is based on Unity Netcode for Entities version 1.3.
Introduction
When building a multiplayer game using Unity Netcode for Entities, one common stumbling block is getting the client to correctly sync with the server-initialized world. If you're like me, you might have written a WorldInitSystem
on the server that instantiates entities using EntityManager.Instantiate
, expecting those entities to appear on the client automatically.
However, when running the game, you might notice nothing shows up on the client, and worse—no errors in the console. That makes debugging especially tricky.
After some frustration, I turned to the Entities Hierarchy window. By default, Unity displays the Server World, so I initially saw entities there and assumed everything was working. But after switching to the Client World, I realized it was empty—no entities were being synced from the server.
That was the "aha" moment: the client wasn't syncing Ghost entities from the server.
Key Requirements for Entity Synchronization
1. Client Must Request to Connect
Client Side: There should be one connection entity.
Server Side: It holds connections for all clients.
Every connection entity gets a
NetworkId
component automatically.But before it’s ready, the connection doesn’t have the
NetworkStreamInGame
component yet.To mark the connection as "in-game" (ready to exchange snapshots), the client needs to:
Create an entity with
IRpcCommand
andSendRpcCommandRequest
components.Set
SendRpcCommandRequest.TargetConnection
to the connection entity.
On the server, once this RPC is received, it can add
NetworkStreamInGame
to the connection, indicating both sides are ready to sync.
2. Ghost-Enabled Prefabs Only
Any entities instantiated on the server must be based on prefabs that include a GhostAuthoringComponent
. Without this, Netcode has no idea these entities should be replicated.
To set it up, open the prefab in the Unity Editor, click "Add Component," and attach the GhostAuthoringComponent
. From there, you can configure its settings such as ghost type (Interpolated or Predicted) and update frequency. Make sure this prefab is included in your GhostPrefabCollectionComponent
, which should be added to a GameObject in a subscene.
Make sure:
The prefab exists in your GhostPrefabCollectionComponent.
The prefab is properly marked with the
GhostAuthoringComponent
.You’re instantiating these prefabs using the server-side
EntityManager
.
3. Use a Custom ClientServerBootstrap
Another critical (and often overlooked) step is using a custom ClientServerBootstrap
class. This ensures:
The worlds (Client, Server, Thin Client, etc.) are initialized properly.
Ghost prefab registration and connection pipelines are correctly wired up.
Final Thoughts
Once you meet the above requirements, you should see the server-instantiated Ghost entities appear on the client side, properly synced via Netcode.
If you're debugging similar issues, remember:
Always check which world you're viewing in the Entities Hierarchy.
Confirm that the connection handshake is complete (
NetworkStreamInGame
is present).Make sure Ghost-prefab setup is correct on both server and client.
I hope this post helps you avoid the same confusion I had when first working with Unity Netcode for Entities. Multiplayer development is complex—but with the right pieces in place, it just clicks.