Commit a6b64cf
Unity Technologies
## [1.6.1] - 2025-05-28
### Added
* 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](https://docs.unity3d.com/Packages/com.unity.netcode@latest?subfolder=/manual/optimizations.html#relevancy-fast-path-via-importance-scaling).
* Analytics to netcode tools to better understand their usage.
### Changed
* **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.
### Fixed
* **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 issue was due to because of an access to `EditorPrefs` and `Application.productName` while restoring the window state.
* Issue where, during host migration, ghosts could be migrated with a 0 id and type. Causing various issues when instantiated on the new host.
* Crash which could happen after host migrations when the server is deploying the host migration data.
* Issue with prespawn prefab entity list initialization after a host migration, the ordering of the prespawn ghosts could be shifted by one because of the internal `PrespawnSceneList` entity prefab creation. This would result in *invalid ghost type X (expected X+1)* off by one style errors.
* The prediction loop will no longer rollback too many times when one ghost is switched from predicted to interpolated, and later switched back to predicted, when that ghost is the only predicted ghost.
* If you update multiple packages, create a new section with a new header for the other package.
* The client packet dump was not being written to the `EnablePacketLogging.NetDebugPacketCache` field, thus were not usable by users and other netcode call-sites (like the `NetworkStreamReceiveSystem`).
* `SnapshotHistorySize` values below 32 uncovered an issue where a ghost chunk being written would write over its snapshot history entries for currently-in-flight snapshots, leading to a cycle of never being able to fetch a valid baseline, in perpetuity. The fix for this requires us to stall the send of this ghost chunk if the in-flight queue is full, until the in-flight snapshots are assumed to have either arrived or been lost/dropped.
* Buffer serialization errors caused by incorrect pointer stepping when ghost fields are not present (i.e. surrounding `GhostComponentSerializer.State.HasGhostFields`).
* Buffer serialization errors caused by missing change mask invalidation when `SendToOwnerType` or `GhostSendType` conditionally prevented sending of the buffer.
* Readded `UsePreSerialization` to the `GhostAuthoringComponent` inspector that was accidentally removed.
### Obsolete
* Prefer `BatchScaleImportanceDelegate` to `ScaleImportanceFunction` as the latter significantly reduces the total number of function pointer calls.
1 parent df9f911 commit a6b64cf
File tree
148 files changed
+6803
-2331
lines changed- Documentation~
- Editor
- Authoring
- Runtime
- Authoring
- Hybrid
- Connection
- HostMigration
- Physics
- PredictionTicking/UpdateRateManagement
- SerializationHelpers
- Snapshot
- Prespawn
- StateSave
- Stats
- Tests
- Editor
- Debugging
- PerformanceTests
- Physics
- Prespawn
- Rpc
- Runtime/Utils
- Editor
- Proxies
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
148 files changed
+6803
-2331
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
| 20 | + | |
| 21 | + | |
13 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
14 | 26 | | |
15 | 27 | | |
16 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
17 | 33 | | |
18 | 34 | | |
19 | 35 | | |
20 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
21 | 49 | | |
22 | 50 | | |
23 | 51 | | |
| |||
74 | 102 | | |
75 | 103 | | |
76 | 104 | | |
77 | | - | |
| 105 | + | |
78 | 106 | | |
79 | 107 | | |
80 | 108 | | |
| |||
93 | 121 | | |
94 | 122 | | |
95 | 123 | | |
96 | | - | |
97 | | - | |
| 124 | + | |
| 125 | + | |
98 | 126 | | |
99 | 127 | | |
100 | | - | |
101 | 128 | | |
102 | 129 | | |
103 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
48 | 110 | | |
49 | 111 | | |
50 | 112 | | |
| |||
0 commit comments