com.unity.netcode 1.6.1
Source docsNotes: processedReleased June 1, 2025
Unity Compatibility
Minimum Unity: 2022.3 (20f1)
Package Dependencies
- com.unity.entities (1.3.5)
- com.unity.modules.animation (1.0.0)
- com.unity.transport (2.4.0)
✨ Features
- Two new entity command buffer systems that run at the beginning and end of the `PredictedSimulationSystemGroup` respectively: `BeginPredictedSimulationCommandBufferSystem` and `EndPredictedSimulationCommandBufferSystem`.
- A new internal `PredictedSpawningSystemGroup`, running after the `EndPredictedSimulationCommandBufferSystem`, created to guarantee that when a new snapshot is received from server, all new ghosts are spawned and ready to receive new data.
- New documentation regarding the NetworkDriverStore architecture, setup and how to use it in conjunction with Unity.Relay.
- Experimental host migration feature added, enabled with the ENABLE\_HOST\_MIGRATION define but otherwise hidden.
- With ENABLE\_HOST\_MIGRATION defined, when a client reconnects to a server after disconnecting the connection entity on both sides will receive a `NetworkStreamIsReconnected` component. An internal unique ID is added to connections to track this behaviour.
- The ability to define a smaller `GhostSystemConstants.SnapshotHistorySize` value via compiler define `NETCODE_SNAPSHOT_HISTORY_SIZE_6` or `NETCODE_SNAPSHOT_HISTORY_SIZE_16`. These values are well suited for larger scale use-cases where server memory is constrained, and snapshot sends of individual ghosts are relatively infrequent.
- Support for combining Ghost Relevancy with Ghost Importance Scaling via new `PrioChunks.isRelevant` field, enabling a fast-path for relevancy calculations.
- Analytics to netcode tools to better understand their usage.
📈 Improvements
- **Behaviour Breaking Change:** Predicted spawned ghosts for partial ticks skip restoring the state from the backup (and instead continue prediction from their spawn state) when the last backup state tick is identical to the spawn tick, as no data has changed.
- **Behaviour Breaking Change:** Reduced the complexity (and performance overhead) of the `GhostCount.GhostCountOnServer` calculations internally. Note that this value is (and always has been) an approximation.
- IsReconnected split into NetworkStreamIsReconnected for reconnected connections and IsMigrated for re-spawned ghosts (Host Migration).
- Moved host migration related types into a `Unity.Netcode.HostMigration` namespace, renamed the `HostMigration` class to `HostMigrationUtility` so it works in the new namespace.
- Prespawn ghost IDs will now be preserved between host migrations
- Client connection `NetworkIDs` are now preserved between host migrations.
🔧 Bug Fixes
- **Behaviour Breaking Change:** Incorrect state serialized inside the `SnapshotDataBuffer` for predicted spawned ghost on the client when spawned inside the prediction loop. The `PredictedGhostSpawnSystem` is now updated also as part of the prediction loop (inside the `PredictedSpawningSystemGroup`) to ensure that any predicted spawned ghosts on the client are correctly initialized at the tick they are spawned, and not with partial tick state.
- Issue where predicted spawned ghosts re-simulated from the wrong tick when configured to rollback to their `spawnTick` and are spawned inside the prediction loop. They are now restored using the corrected full tick state, rather than the erroneous partial tick state.
- Enable creating and initializing server drivers when using WebGL to enable self-hosting cases using relay. Many methods were under conditional compilation flags and removed from the WebGL build and not usable outside the editor.
- All the unmanaged systems present in the FixedStepSimulationSystemGroup that have a direct or indirect update dependency to the PhysicsSystemGroup are now correctly moved to the PredictedFixedStepSimulationSystemGroup. This is a **Behaviour Change** in respect the previous versions, where all the unmanaged systems continued to stay inside the fixed update group, regardless of the dependency of update order.
- An issue with Mutiplayer PlayModeTool window, throwing exceptions when docked after a domain reload. The i
