Netcode for Entities 1.9.0 is now live! ![]()
Hey everyone! We’re back with another batch of updates for Netcode for Entities. We are still experimenting on how to structure those messages because because their goal is:
- Shortly explain what is the most interesting in this package update and on what you should pay attention to
- Gather feedback and your opinions on the changes and current package state. Even though we may not be always able to quickly address those it’s still super valuable to us and helps directing package development
NetcodeSamples update
We updated NetcodeSamples (REPO LINK) to the latest version (which for example includes a Host Migration sample) and we are planning to update them consistently with each Netcode package release.
We know it wasn’t updated for some time and those samples are not perfect so we want to use this opportunity to ask you for your pain points when using them for learning purposes, namely
- Is there any functionality/sample that you would like us to implement in the samples?
- Are there sample issues that you would like us to prioritize?
Key Updates in This Release
The most important updates happened around Despawning
- Ghost Despawn Handling (Breaking Change): We changed the way how despawn messages are sent which improves throughput and reduces bandwidth. The minimum snapshot packet size is now 100 bytes.
- Snapshot Performance: Delta-compression for despawns is improved, and bandwidth use for ghost data is further optimized.
- API Changes:
- The
PrefabDebugName.Namefield is now fully deprecated, increasing per-chunk entity capacity. - New setting:
GhostSendSystemData.PercentReservedForDespawnMessagescontrols how much of the snapshot is reserved for despawns (defaults to 33%).
- The
- Reliability Fixes: Resolved memory leaks, improved host migration data reliability, and fixed rare ghost despawn and snapshot errors.
- Developer Experience: We added clickable link that help to resolve disable Batched Tick related warnings and new buttons for thin client management in PlayMode Tools.
We hope these changes make your multiplayer projects more efficient and reliable. Let us know if you have feedback or questions!
Happy Netcoding! ![]()
Fixed
- The analyzer to warn about using the
Simulatecomponent while ignoring enabled state has been fixed to correctly warn when using SystemAPI.Query().WithAll()` and similar calls. - Issue where the ghost data writes could fail while gathering the host migration data (now it will always grow correctly).
Allocator.Persistentmemory leaks caused byImportanceDrawerSystem.cs.ClampPartialTicksThresholdnow displays correctly in theNetCodeConfig.- Behaviour Breaking Change: Ghost despawn messages are now added to the snapshot in a round-robin priority order, where up to 2 despawn messages can be “in-flight” for a single ghost at once. Old behaviour was to send up to 100 ghostIds per snapshot, where each despawn was sent up to 5 times in a row before the next 100 could be added. Delta-compression has also been significantly improved. This new approach significantly improves despawn throughput, while also significantly reducing despawn bandwidth consumption.
- Behaviour Breaking Change: The minimum
DefaultSnapshotPacketSizeis now 100 bytes, up from 1 byte. - Incorrectness in ghost despawn message handling, leading to missed despawns, and rare snapshot errors.
- Hardened snapshot receive logic to expect exact
dataStream.GetBitsRead()correctness, and used it to fix a (harmless) incorrectness when a chunk attempts to write its first ghost into the snapshot, but fails due to exceeding the stream capacity. - Potential dependency error with importance visualization.
- Broken table on PlayMode Tool documentation page.
Changed
- Marginally reduced the bandwidth consumption of the
GIDandSpawnTickvalues of ghosts within snapshots, on average. - API Breaking Change: The
PrefabDebugName.Namehas now been fully deprecated, reducing archetype chunk sizes, increasing per-chunk entity capacity for ghost instances. - Best practice on GhostOwnerIsLocal usage. Server-only world behaviour is now undefined and might be changed in future versions. GhostOwnerIsLocal should only be used in client logic. To find owned ghosts in prediction logic, please make sure to strip your input components so they only appear on predicted ghosts.
- Best practice on NetcodeServerRateManage.WillUpdate. Should now use NetworkTime.NumPredictedTicksExpected server side.
- Significant internal refactoring for upcoming Single World Host feature.
- The importance visualizer setting name for “Per Entity Spatial Chunk Structure” has been changed to “Per Chunk”. This does not change the behavior, the name is only changed to more accurately reflect the underlying data that is being visualized.
- Made
NetworkDriverStoremethods readonly, where possible.
Added
GenerateTestsForBurstCompatibilitytest coverage - andToStringoverloads - ofToFixedStringmethods.- Behaviour Breaking Change:
GhostSendSystemData.PercentReservedForDespawnMessagesdenoting the percentage of the snapshot capacity reserved for ghost despawn messages, with a default value of 33% (i.e. one third of the snapshot). This replaces the internal const of 100 ghosts. - A clickable link directing users where to disable Batched Tick Warnings.
- New + and - buttons for automatic thin client creation in the PlayMode Tools window.
- Bounds checks to
NetworkDriverStoreandNetworkDriverStore.Concurrentdriver accessors.