Releases: needle-mirror/com.unity.netcode
Releases · needle-mirror/com.unity.netcode
1.12.0
[1.12.0] - 2026-02-01
Added
- Netcode profiler now supports tick-based navigation through a new title bar that has buttons to jump to the next or previous frame where a snapshot was sent or received. It also allows the selection of the corresponding tick on the client or server side.
- Search fields for the ghost snapshot tree view and prediction error list view.
- The Netcode Profiler now shows the values of the client prediction tick and the interpolation tick in the Prediction and Interpolation Tab.
- Editor analytics for the netcode profiler.
Changed
1.11.0
[1.11.0] - 2025-12-12
Added
- New Prefab List menu item and playmode tools button to quickly list all ghost prefabs in your project or scene hierarchy.
- Internal changes to support GameObject ghosts. More to come later. See Discussions post talking more about this work in progress.
- [Potential Breaking Change] Moving server side's ghost spawn writes from BeginFrame ECB to new PresentationGroup ECB.
- [Potential Breaking Change] GhostAuthoringComponent's content has been moved to a base class.
- Netcode profiler received new tooltips and warning icons. These will show if compression efficiency is low or the snapshot size is approaching max message size.
- Static ghosts now aggressively attempt to avoid looking up snapshot data (via
SnapshotData.GetDataAtTick) inside theGhostUpdateSystem.UpdateJob, and the job itself early outs if there are no ghosts needing to restore, leading to a ~90% reduction in job timings. Profiler markers have also been added to this job, denoting which ghost types (and API calls) are taking the time. - Users can now migrate non ghost data using the
IncludeInMigrationcomponent and the associatedNonGhostMigrationComponentsbuffer. - Non-Ghost Components marked for migration on a Ghost Entity will now be automatically migrated to the correct Ghost.
Changed
- Corrected ghost-types-templates docs regarding the packed vs unpacked format of
bool,byte,sbyte,float, anddouble. - Improved the
boolserialization template, improving packed and unpacked costs (~4 bits to 1 bit, and 32 bits to 8 bits, respectively).
Fixed
- An issue with static optimized ghosts, where incorrect logic in the
GhostUpdateSystemcaused them to not have theirCopyFromSnapshotcalled even once in rare cases, which led to[GhostFields]likeStaticAsteroid.SpawnTick(which need additional processing via theCopyFromSnapshotcode-gen) to be incorrect on the client. NetworkEndpointserialization inside GhostField's, which were mistakenly usingSerializeNetworkEndpointUnpackedin a packed case.- Missing average per entity column for per ghost type overhead sections in the profiler.
1.10.0
[1.10.0] - 2025-11-09
Added
- World state save can now correctly save zero sized components.
- Netcode Profiler - added a context menu in the Ghost Snapshot View's TreeView Labels to quickly access and inspect Ghost Prefabs and Components.
Changed
- Dependent version of com.unity.entities is updated to 1.4.2.
- Source generators will now only run as part of compilation within Unity, and not in IDEs (tested with Rider and Visual Studio, please report a bug if you use another IDE where they are not disabled). This will disable generated sources from showing up in your IDE, but will significantly speed up Roslyn processes in IDEs.
Removed
- Usage of obsolete entities method
GetRefRWOptional
Fixed
- Erroneous Assert in the
PredictedGhostSpawnSystemincorrectly stating that theInitJobdoes not support enableable components, despite the fact that the query itself polls for disabled entities. - Removed warning that spams console when
ClientServerTickRate.TargetFrameRateModeis set toSleep. - Rare issue where an exception would happen in the first run of the prediction loop, only happens when
PredictionUpdateLoopModeis set toAlwaysRun - You can again add multiple
Entitytypes to your ghost components and commands. - Shorts are now properly supported in components and commands.
- Missing Physics-related API docs have been re-added.
1.9.3
[1.9.3] - 2025-11-06
Fixed
- You can again add multiple
Entitytypes to your ghost components and commands. - Shorts are now properly supported in components and commands.
- Missing Physics-related API docs have been re-added.
1.9.2
[1.9.2] - 2025-10-31
Fixed
- Removed warning that spams console when
ClientServerTickRate.TargetFrameRateModeis set toSleep.
1.9.1
[1.9.1] - 2025-10-11
Changed
- Host migration system now caches the ghost component types it uses when collecting host migration ghost data, resulting in faster host migration data collections. It's updated any time the ghost prefab count changes.
GhostField.Quantizationtemplate mismatch errors are now warnings, and will resolve to working code, rather than outputting errors. As a result, we will no longer assume primitive integer types want to disable quantization, as that logic did not cover all cases (e.g. likeEntitystructs etc).- Host migration internal ghost data gathering has improved and should be faster now but add a few bytes of extra data compared to before.
Fixed
- Occasional
MultiplayerPlayModeWindow.HandleHyperLinkArgstruncation error spam. - Unsafe compiler error when using a
fixedarray as aGhostField. Note: You must implement a corresponding safe accessor method implementing ref returns. GhostFieldcompiler error when usingFixedListwith nestedstructtypes, as well as relatedInvalidOperationExceptionin aSubStringcall when using aFixedListwith a primitive type.- Code generator incorrectness when generating struct fields for
GhostFieldFixedListandfixedarray serializers (Entityfields in particular). - Incorrect
curChangeMaskBitsoffset after aFixedListfield is generated, due to incorrectaggregateChangeMaskflag. It's now forced correct viaforceComposite. FixedList's andunsafe fixed array) now correctly support non-public structs for the element type (in cases where we know the code-gen will resolve without compiler errors).GhostSnapshotValueEntitynow usesTryGetValuerather than aHasComponentcall followed by a lookup, reducing lookup costs.- Issue where specifying a
LogLevel(via theDefault.globalconfig'sunity.netcode.sourcegenerator.logging_levelproperty) did nothing.
1.9.0
[1.9.0] - 2025-09-15
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.
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.
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.
1.8.0
[1.8.0] - 2025-08-17
Added
- The Playmode Tool's Importance Visualizer drawer that helps visualize Importance Scaling outcomes.
- The
GhostDistancePartitioningSystem.AutomaticallyAddGhostDistancePartitionSharedComponent, which allows you to opt-out of the default behaviour (of always adding aGhostDistancePartitionSharedto all valid ghost instances), enabling you to filter your importance scaling on the existence of this shared component (without having to rip out the entire implementation). - Test coverage of
GhostImportance.BatchScaleImportanceFunctionandGhostImportance.ScaleImportanceFunctionhas been improved (via NetcodeSamples tests), particularly in cases where theGhostDistancePartitionShared(or user-code equivalent) is only added to a subset of all ghosts (i.e. used as a filter). - Support for Forced Input Latency via
ClientTickRate.ForcedInputLatencyTicks, with new fieldsNetworkTime.InputTargetTickandNetworkTime.EffectiveInputLatencyTicks, and new input systemApplyCurrentInputBufferElementToInputDataForGatherSystem<TInputComponentData, TInputHelper>(which was needed to correctly handleIInputComponentDataincremental values). NetworkTime.NumPredictedTicksExpecteddenotes the (un-batched) number of predicted ticks that the client is expected to run within this prediction loop update.- [Experimental] Server and Client Profiler Modules for the Unity Profiler Window as an alternative to the web profiler. Adds new stats and includes per-component stats. Requires Unity 6 or newer. Set the script define NETCODE_PROFILER_ENABLED to enable this feature.
Changed
- Behaviour Breaking Change:
GhostDistanceImportancescale functions no longer multiply thebaseImportanceby 1000, as that is now performed automatically by theGhostSendSystem(see newGhostSystemConstants.ImportanceScalingMultiplierconstant), removing the final importance 1000x discrepancy between ghost chunks that use importance scaling, and ones that don't. - Input systems that write the
NetworkTime.ServerTickintoAddCommandDatacalls should instead useInputTargetTickfor correctness. This value only differs fromServerTickwhen input latency is encountered (seeForcedInputLatencyTicksandMaxPredictAheadTimeMS). NetworkTime.ToFixedStringoutput has been extended to reflect the new Forced Input Latency data.- Updated com.unity.transport dependency to 2.5.3 from 2.4.0
Fixed
- Instead of constantly mispredicting,
MaxPredictAheadTimeMSwill now correctly add forced input latency to the client when said clients RTT is higher than this value. - A potential crash with buffers and prediction switching stripping when your prefab contained a non-zero sized IBufferElementData that was marked for prediction/interpolation only. When restoring any buffer to their prefab value, the wrong length was used, potentially leading to a memcpy overwriting memory.
1.7.0
[1.7.0] - 2025-07-29
Added
- A warning will now appear if you have a query involving
Simulatewhile ignoring enabled state withEntityQueryOptions.IgnoreComponentEnabledStatein the prediction loop.
Changed
- Removed
ENABLE_HOST_MIGRATIONdefine which hid the host migration feature, it's now enabled by default. This also enables by default theNetworkStreamIsReconnectedcomponent which works without host migration. - Refactor host migration API
- Removed
MigrateDataToNewServerWorld/ConfigureClientAndConnecthelper functions. They'll be in the docs and sample instead. - Renamed
HostMigrationUtility->HostMigrationDataand in that class renamedGet/SetHostMigrationDatatoGet/Set(class only contains data methods) with parameters reflecting directionality of data buffer and world. RemovedTryGetHostMigrationData, useGetinstead (native list version). - Removed
DataStorageMethodas it no only has one enum value.
- Removed
- The ghost component serialization method in the host migration feature changed to a much better performing one.
Fixed
- Issue where
PreparePredictedDatawas not being called onGhostPlayableBehaviour, breakingGhostAnimationControllerfunctionality. - Issue where
NetCodeConfig.EnableClientServerBootstrapwas not visible within theNetCodeConfig. - Issue when running a webgl player where you could not connect or receive connections from non-webgl platform players.
1.6.2
[1.6.2] - 2025-07-07
Added
UnityEngine.Time.frameCountis appended to netcode packettimestamplogs using format:[Fr{0}].
Changed
- The client now sends - as part of its command data - some extra information regarding the command tick. In particular, it informs the server if the current command is for a full or partial update/tick. This ensure a more proper time-sync, and avoids mis-predictions.
Fixed
- Adding
GhostAuthoringComponentwill now work properly for a prefab that is opened (double clicked instead of just selected). - Issue preventing static-optimized, not pre-spawned ghosts from spawning on clients when their first serialization result was 'zero-change' against a baseline value of
default(T). They'd previously only be sent for the first time after changing. - Project Breaking Change: Regenerated the GUID for
Packages/com.unity.netcode/Tests/Editor/Physics/Unity.NetCode.Physics.Editor.Tests.asmdefso that it would no longer clash withPackages/com.havok.physics/Plugins/Android/Havok.Physics.Plugin.Android.asmdef. Any assemblies attempting to reference Unity.NetCode.Physics.Editor.Tests by GUIDd8342c4acf8f78e439367cff1a5e802fwill need to be changed tobec3f262d6e6466eb2c61661da550f47. - An issue - due to improper time syncing in between the client and server - especially when using IPC, causing multiple side effects:
- the client was typically only sending commands to the server for partial ticks, not full ticks, causing mis-predictions.
- the client was slightly behind the server, thus receiving new snapshots slightly in advance, and skipping running the
PredictedSimulationSystemGroupfor one frame or more, causing jittery and noticeable artefacts.
- Potential Behaviour Breaking Change: GhostInstance's GhostType is now set with the same valid value for both client and server prespawned instances. (Previously, this was always kept at an initial -1 value server side and never initialized). This way is now more consistent behaviour between client and server.