Releases: Unity-Technologies/com.unity.netcode.gameobjects
Releases · Unity-Technologies/com.unity.netcode.gameobjects
2.4.0
[2.4.0] - 2025-06-02
Added
- Added
SinglePlayerTransportthat provides the ability to start as a host for a single player network session. (#3473) - When using UnityTransport >=2.4 and Unity >= 6000.1.0a1, SetConnectionData will accept a fully qualified hostname instead of an IP as a connect address on the client side. (#3441)
Fixed
- Fixed issue where the
NetworkObject.DontDestroyWithOwnerwas not being honored. (#3477) - Fixed issue where non-authority
NetworkTransforminstances would not allow non-synchronized axis values to be updated locally. (#3471) - Fixed issue where invoking
NetworkObject.NetworkShowandNetworkObject.ChangeOwnershipconsecutively within the same call stack location could result in an unnecessary change in ownership error message generated on the target client side. (#3468) - Fixed issue where
NetworkVariables on aNetworkBehaviourcould fail to synchronize changes if one hasNetworkVariableUpdateTraitsset and is dirty but is not ready to send. (#3466) - Fixed issue with the Distributed Authority connection sequence with scene management enabled where the
ClientConnectedevent was fired before the client was synchronized. (#3459) - Fixed inconsistencies in the
OnSceneEventcallback. (#3458) - Fixed issues with the
NetworkBehaviourandNetworkVariablelength safety checks. (#3405) - Fixed memory leaks when domain reload is disabled. (#3427)
- Fixed issue where disabling the physics or physics2D package modules could result in a compilation error. (#3422)
- Fixed an exception being thrown when unregistering a custom message handler from within the registered callback. (#3417)
1.13.0
[1.13.0] - 2025-04-30
Added
- Added
NetworkManager.OnPreShutdownwhich is called before the NetworkManager cleans up and shuts down. (#3358) - Added
FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator)constructor that uses theArraySegment.Offsetas theFastBufferReaderoffset and theArraySegment.Countas theFastBufferReaderlength. (#3320) - Added
FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator, int length = -1)constructor that uses theArraySegment.Offsetas theFastBufferReaderoffset. (#3320)
Fixed
- Fixed memory leaks when domain reload is disabled. (#3428)
- Fixed issues with the
NetworkBehaviourandNetworkVariablelength safety checks. (#3415) - Fixed issue where during a
NetworkObject's spawn if you instantiated, spawned, and parented another network prefab under the currently spawningNetworkObjectthe parenting message would not properly defer until the parentNetworkObjectwas spawned. (#3403) - Fixed issue where in-scene placed
NetworkObjectscould fail to synchronize its transform properly (especially without aNetworkTransform) if their parenting changes from the default when the scene is loaded and if the same scene remains loaded between network sessions while the parenting is completely different from the original hierarchy. (#3388) - Fixed an issue in
UnityTransportwhere the transport would accept sends on invalid connections, leading to a useless memory allocation and confusing error message. (#3383) - Fixed issue where
NetworkAnimatorwould log an error if there was no destination transition information. (#3384) - Fixed initial
NetworkTransformspawn, ensure it uses world space. (#3361) - Fixed issue where
AnticipatedNetworkVariableprevious value returned byAnticipatedNetworkVariable.OnAuthoritativeValueChangedis updated correctly on the non-authoritative side. (#3322)
Changed
- Changed the scene loading event serialization order for in-scene placed
NetworkObjectsto be based on their parent-child hierarchy. (#3388)
2.3.2
[2.3.2] - 2025-04-22
Fixed
- Fixed issue where the authority instance of NetworkTransform could check for state updates more than one time in a frame if the frame rate is greater than the tick frequency. (#3413)
- Fixed issue where the new interpolator types were blocking after the first consumption of a sequence of buffered state updates. (#3413)
- Fixed issue where root level in-scene placed
NetworkObjectswould only allow the ownership permission to be no less than distributable or sessionowner. (#3407)
2.3.1
2.3.0
Added
- Added
NetworkManager.OnPreShutdownwhich is called before the NetworkManager cleans up and shuts down. (#3366) - Added
Lerpinterpolation type that still uses a lerp approach but uses the new buffer consumption logic. (#3355) - Added property to enable or disable lerp smoothing for position, rotation, and scale interpolators. (#3355)
- Added
NetworkTransform.InterpolationBufferTickOffsetstatic property to provide users with a way to increase or decrease the time marker where interpolators will pull state update from the queue. (#3355) - Added interpolator types as an inspector view selection for position, rotation, and scale. (#3337)
- Added a new smooth dampening interpolator type that provides a nice balance between precision and smoothing results. (#3337)
- Added
NetworkTimeSystem.TickLatencyproperty that provides the average latency of a client. (#3337) - Added
FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator)constructor that uses theArraySegment.Offsetas theFastBufferReaderoffset and theArraySegment.Countas theFastBufferReaderlength. (#3321) - Added
FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator, int length = -1)constructor that uses theArraySegment.Offsetas theFastBufferReaderoffset. (#3321)
Fixed
- Fixed issue where in-scene placed
NetworkObjectscould fail to synchronize its transform properly (especially without aNetworkTransform) if their parenting changes from the default when the scene is loaded and if the same scene remains loaded between network sessions while the parenting is completely different from the original hierarchy. (#3387) - Fixed an issue in
UnityTransportwhere the transport would accept sends on invalid connections, leading to a useless memory allocation and confusing error message. (#3382) - Fixed issue where the time delta that interpolators used would not be properly updated during multiple fixed update invocations within the same player loop frame. (#3355)
- Fixed issue when using a distributed authority network topology and many clients attempt to connect simultaneously the session owner could max-out the maximum in-flight reliable messages allowed, start dropping packets, and some of the connecting clients would fail to fully synchronize. (#3350)
- Fixed issue when using a distributed authority network topology and scene management was disabled clients would not be able to spawn any new network prefab instances until synchronization was complete. (#3350)
- Fixed issue where an owner that changes ownership, when using a distributed authority network topology, could yield identical previous and current owner identifiers. This could also cause
NetworkTransformto fail to change ownership which would leave the previous owner still subscribed to network tick events. (#3347) - Fixed issue where the
MaximumInterpolationTimecould not be modified from within the inspector view or runtime. (#3337) - Fixed
ChangeOwnershipchanging ownership to clients that are not observers. This also happened with automated object distribution. (#3323) - Fixed issue where
AnticipatedNetworkVariableprevious value returned byAnticipatedNetworkVariable.OnAuthoritativeValueChangedis updated correctly on the non-authoritative side. (#3306) - Fixed
OnClientConnectedCallbackpassing incorrectclientIdwhen scene management is disabled. (#3312) - Fixed issue where the
NetworkObject.Ownershipcustom editor did not take the default "Everything" flag into consideration. (#3305) - Fixed DestroyObject flow on non-authority game clients. (#3291)
- Fixed exception being thrown when a
GameObjectwith an associatedNetworkTransformis disabled. (#3243) - Fixed issue where the scene migration synchronization table was not cleaned up if the
GameObjectof aNetworkObjectis destroyed before it should have been. (#3230) - Fixed issue where the scene migration synchronization table was not cleaned up upon
NetworkManagershutting down. (#3230) - Fixed
NetworkObject.DeferDespawnto respect theDestroyGameObjectparameter. (#3219) - Fixed issue where a
NetworkObjectwith nestedNetworkTransformcomponents of varying authority modes was not being taken into consideration and would break both the initialNetworkTransformsynchronization and fail to properly handle synchronized state updates of the nestedNetworkTransformcomponents. (#3209) - Fixed issue with distributing parented children that have the distributable and/or transferrable permissions set and have the same owner as the root parent, that has the distributable permission set, were not being distributed to the same client upon the owning client disconnecting when using a distributed authority network topology. (#3203)
- Fixed issue where a spawned
NetworkObjectthat was registered with a prefab handler and owned by a client would invoke destroy more than once on the host-server side if the client disconnected while theNetworkObjectwas still spawned. (#3200) - Fixed issue where
NetworkVariableBasederived classes were not being re-initialized if the associatedNetworkObjectinstance was not destroyed and re-spawned. (#3181)
Changed
- Changed the scene loading event serialization order for in-scene placed
NetworkObjects to be based on their parent-child hierarchy. (#3387) - Changed the original
Lerpinterpolation type toLegacyLerp. (#3355) - Changed
BufferedLinearInterpolator<T>.Update(float deltaTime, NetworkTime serverTime)as being deprecated since this method is only used for internal testing purposes. (#3337) - Changed error thrown when attempting to build a dedicated server with Unity Transport that uses websockets to provide more useful information to the user. (#3336)
- Changed root in-scene placed
NetworkObjectinstances now will always have either theDistributablepermission set unless theSessionOwnerpermission is set. (#3305) - Changed the
DestroyObjectmessage to reduce the serialized message size and remove the unnecessary message field. (#3304) - Changed the
NetworkTimeSystem.Syncmethod to use half RTT to calculate the desired local time offset as opposed to the full RTT. (#3212)
2.2.0
[2.2.0] - 2024-12-12
Added
- Added
NetworkObject.OwnershipStatus.SessionOwnerto allow Network Objects to be distributable and only owned by the Session Owner. This flag will override all otherOwnershipStatusflags. (#3175) - Added
UnityTransport.GetEndpointmethod to provide a way to obtainNetworkEndpointinformation of a connection via client identifier. (#3130) - Added
NetworkTransport.OnEarlyUpdateandNetworkTransport.OnPostLateUpdatemethods to provide more control over handling transport related events at the start and end of each frame. (#3113)
Fixed
- Fixed issue where the server, host, or session owner would not populate the in-scene place
NetworkObjecttable if the scene was loaded prior to starting theNetworkManager. (#3177) - Fixed issue where the
NetworkObjectIdHashvalue could be incorrect when entering play mode while still in prefab edit mode with pending changes and using MPPM. (#3162) - Fixed issue where a sever only
NetworkManagerinstance would spawn the actualNetworkPrefab'sGameObjectas opposed to creating an instance of it. (#3160) - Fixed issue where only the session owner (as opposed to all clients) would handle spawning prefab overrides properly when using a distributed authority network topology. (#3160)
- Fixed issue where an exception was thrown when calling
NetworkManager.Shutdownafter callingUnityTransport.Shutdown. (#3118) - Fixed issue where
NetworkListproperties on in-scene placedNetworkObjects could cause small memory leaks when entering playmode. (#3147) - Fixed in-scene
NertworkObjectsynchronization issue when loading a scene with currently connected clients connected to a session created by aNetworkManagerstarted as a server (i.e. not as a host). (#3133) - Fixed issue where a
NetworkManagerstarted as a server would not add itself as an observer to in-scene placedNetworkObjects instantiated and spawned by a scene loading event. (#3133) - Fixed issue where spawning a player using
NetworkObject.InstantiateAndSpawnorNetworkSpawnManager.InstantiateAndSpawnwould not update theNetworkSpawnManager.PlayerObjectsor assign the newly spawned player to theNetworkClient.PlayerObject. (#3122) - Fixed issue where queued UnitTransport (NetworkTransport) message batches were being sent on the next frame. They are now sent at the end of the frame during
PostLateUpdate. (#3113) - Fixed issue where
NotOwnerRpcTargetorOwnerRpcTargetwere not using their replacementsNotAuthorityRpcTargetandAuthorityRpcTargetwhich would invoke a warning. (#3111) - Fixed issue where client is removed as an observer from spawned objects when their player instance is despawned. (#3110)
- Fixed issue where
NetworkAnimatorwould statically allocate write buffer space forAnimatorparameters that could cause a write error if the number of parameters exceeded the space allocated. (#3108)
Changed
- In-scene placed
NetworkObjects have been made distributable when balancing object distribution after a connection event. (#3175) - Optimised
NetworkVariableandNetworkTransformrelated packets when in Distributed Authority mode. - The Debug Simulator section of the Unity Transport component was removed. This section was not functional anymore and users are now recommended to use the more featureful Network Simulator tool from the Multiplayer Tools package instead. (#3121)
1.12.0
[1.12.0] - 2024-11-19
Added
- Added
UnityTransport.GetEndpointmethod to provide a way to obtainNetworkEndpointinformation of a connection via client identifier. (#3131) - Added a static
NetworkManager.OnInstantiatedevent notification to be able to track when a newNetworkManagerinstance has been instantiated. (#3089) - Added a static
NetworkManager.OnDestroyingevent notification to be able to track when an existingNetworkManagerinstance is being destroyed. (#3089) - Added message size validation to named and unnamed message sending functions for better error messages. (#3043)
- Added "Check for NetworkObject Component" property to the Multiplayer->Netcode for GameObjects project settings. When disabled, this will bypass the in-editor
NetworkObjectcheck onNetworkBehaviourcomponents. (#3034)
Fixed
- Fixed issue where
NetworkListproperties on in-scene placedNetworkObjects could cause small memory leaks when entering playmode. (#3148) - Fixed issue where a newly synchronizing client would be synchronized with the current
NetworkVariablevalues always which could cause issues with collections if there were any pending state updates. Now, when initially synchronizing a client, if aNetworkVariablehas a pending state update it will serialize the previously known value(s) to the synchronizing client so when the pending updates are sent they aren't duplicate values on the newly connected client side. (#3126) - Fixed issue where changing ownership would mark every
NetworkVariabledirty. Now, it will only mark anyNetworkVariablewith owner read permissions as dirty and will send/flush any pending updates to all clients prior to sending the change in ownership message. (#3126) - Fixed issue with
NetworkVariablecollections where transferring ownership to another client would not update the new owner's previous value to the most current value which could cause the last/previous added value to be detected as a change when adding or removing an entry (as long as the entry removed was not the last/previously added value). (#3126) - Fixed issue where a client (or server) with no write permissions for a
NetworkVariableusing a standard .NET collection type could still modify the collection which could cause various issues depending upon the modification and collection type. (#3126) - Fixed issue where
NetworkAnimatorwould statically allocate write buffer space forAnimatorparameters that could cause a write error if the number of parameters exceeded the space allocated. (#3124) - Fixed issue with the in-scene network prefab instance update menu tool where it was not properly updating scenes when invoked on the root prefab instance. (#3084)
- Fixed issue where
NetworkAnimatorwould send updates to non-observer clients. (#3058) - Fixed issue where an exception could occur when receiving a universal RPC for a
NetworkObjectthat has been despawned. (#3055) - Fixed issue where setting a prefab hash value during connection approval but not having a player prefab assigned could cause an exception when spawning a player. (#3046)
- Fixed issue where collections v2.2.x was not supported when using UTP v2.2.x within Unity v2022.3. (#3033)
- Fixed issue where the
NetworkSpawnManager.HandleNetworkObjectShowcould throw an exception if one of theNetworkObjectcomponents to show was destroyed during the same frame. (#3029) - Fixed issue where the
NetworkManagerHelperwas continuing to check for hierarchy changes when in play mode. (#3027)
Changed
- Changed
NetworkVariableDeltaMessageso the server now forwards delta state updates (owner write permission based from a client) to other clients immediately as opposed to keeping aNetworkVariableorNetworkListdirty and processing them at the end of the frame or potentially on the next network tick. (#3126) - The Debug Simulator section of the Unity Transport component will now be hidden if Unity Transport 2.0 or later is installed. It was already non-functional in that situation and users should instead use the more featureful Network Simulator tool from the Multiplayer Tools package. (#3120)
2.1.1
[2.1.1] - 2024-10-18
Added
- Added ability to edit the
NetworkConfig.AutoSpawnPlayerPrefabClientSidewithin the inspector view. (#3097) - Added
IContactEventHandlerWithInfothat derives fromIContactEventHandlerthat can be updated per frame to provideContactEventHandlerInfoinformation to theRigidbodyContactEventManagerwhen processing collisions. (#3094)ContactEventHandlerInfo.ProvideNonRigidBodyContactEvents: When set to true, non-Rigidbodycollisions with the registeredRigidbodywill generate contact event notifications. (#3094)ContactEventHandlerInfo.HasContactEventPriority: When set to true, theRigidbodywill be prioritized as the instance that generates the event if theRigidbodycolliding does not have priority. (#3094)
- Added a static
NetworkManager.OnInstantiatedevent notification to be able to track when a newNetworkManagerinstance has been instantiated. (#3088) - Added a static
NetworkManager.OnDestroyingevent notification to be able to track when an existingNetworkManagerinstance is being destroyed. (#3088)
Fixed
- Fixed issue where
NetworkPrefabProcessorwould not mark the prefab list as dirty and prevent saving theDefaultNetworkPrefabsasset when only imports or only deletes were detected.(#3103) - Fixed an issue where nested
NetworkTransformcomponents in owner authoritative mode cleared their initial settings on the server, causing improper synchronization. (#3099) - Fixed issue with service not getting synchronized with in-scene placed
NetworkObjectinstances when a session owner starts aSceneEventType.Loadevent. (#3096) - Fixed issue with the in-scene network prefab instance update menu tool where it was not properly updating scenes when invoked on the root prefab instance. (#3092)
- Fixed an issue where newly synchronizing clients would always receive current
NetworkVariablevalues, potentially causing issues with collections if there were pending updates. Now, pending state updates serialize previous values to avoid duplicates on new clients. (#3081) - Fixed issue where changing ownership would mark every
NetworkVariabledirty. Now, it will only mark anyNetworkVariablewith owner read permissions as dirty and will send/flush any pending updates to all clients prior to sending the change in ownership message. (#3081) - Fixed an issue where transferring ownership of
NetworkVariablecollections didn't update the new owner’s previous value, causing the last added value to be detected as a change during additions or removals. (#3081) - Fixed issue where a client (or server) with no write permissions for a
NetworkVariableusing a standard .NET collection type could still modify the collection which could cause various issues depending upon the modification and collection type. (#3081) - Fixed issue where applying the position and/or rotation to the
NetworkManager.ConnectionApprovalResponsewhen connection approval and auto-spawn player prefab were enabled would not apply the position and/or rotation when the player prefab was instantiated. (#3078) - Fixed issue where
NetworkObject.SpawnWithObserverswas not being honored when spawning the player prefab. (#3077) - Fixed issue with the client count not being correct on the host or server side when a client disconnects itself from a session. (#3075)
Changed
- Changed
NetworkConfig.AutoSpawnPlayerPrefabClientSideis no longer automatically set when startingNetworkManager. (#3097) - Updated
NetworkVariableDeltaMessageso the server now forwards delta state updates from clients immediately, instead of waiting until the end of the frame or the next network tick. (#3081)
2.0.0
[2.0.0] - 2024-09-12
Added
- Added tooltips for all of the
NetworkObjectcomponent's properties. (#3052) - Added message size validation to named and unnamed message sending functions for better error messages. (#3049)
- Added "Check for NetworkObject Component" property to the Multiplayer->Netcode for GameObjects project settings. When disabled, this will bypass the in-editor
NetworkObjectcheck onNetworkBehaviourcomponents. (#3031) - Added
NetworkTransform.SwitchTransformSpaceWhenParentedproperty that, when enabled, will handle the world to local, local to world, and local to local transform space transitions when interpolation is enabled. (#3013) - Added
NetworkTransform.TickSyncChildrenthat, when enabled, will tick synchronize nested and/or childNetworkTransformcomponents to eliminate any potential visual jittering that could occur if theNetworkTransforminstances get into a state where their state updates are landing on different network ticks. (#3013) - Added
NetworkObject.AllowOwnerToParentproperty to provide the ability to allow clients to parent owned objects when running in a client-server network topology. (#3013) - Added
NetworkObject.SyncOwnerTransformWhenParentedproperty to provide a way to disable applying the server's transform information in the parenting message on the client owner instance which can be useful for owner authoritative motion models. (#3013) - Added
NetcodeEditorBaseeditor helper class to provide easier modification and extension of the SDK's components. (#3013)
Fixed
- Fixed issue where
NetworkAnimatorwould send updates to non-observer clients. (#3057) - Fixed issue where an exception could occur when receiving a universal RPC for a
NetworkObjectthat has been despawned. (#3052) - Fixed issue where a NetworkObject hidden from a client that is then promoted to be session owner was not being synchronized with newly joining clients.(#3051)
- Fixed issue where clients could have a wrong time delta on
NetworkVariableBasewhich could prevent from sending delta state updates. (#3045) - Fixed issue where setting a prefab hash value during connection approval but not having a player prefab assigned could cause an exception when spawning a player. (#3042)
- Fixed issue where the
NetworkSpawnManager.HandleNetworkObjectShowcould throw an exception if one of theNetworkObjectcomponents to show was destroyed during the same frame. (#3030) - Fixed issue where the
NetworkManagerHelperwas continuing to check for hierarchy changes when in play mode. (#3026) - Fixed issue with newly/late joined clients and
NetworkTransformsynchronization of parentedNetworkObjectinstances. (#3013) - Fixed issue with smooth transitions between transform spaces when interpolation is enabled (requires
NetworkTransform.SwitchTransformSpaceWhenParentedto be enabled). (#3013)
Changed
- Changed
NetworkTransformEditornow usesNetworkTransformas the base type class to assure it doesn't display a foldout group when using the baseNetworkTransformcomponent class. (#3052) - Changed
NetworkAnimator.Awakeis now a protected virtual method. (#3052) - Changed when invoking
NetworkManager.ConnectionManager.DisconnectClientduring a distributed authority session a more appropriate message is logged. (#3052) - Changed
NetworkTransformEditorso it now derives fromNetcodeEditorBase. (#3013) - Changed
NetworkRigidbodyBaseEditorso it now derives fromNetcodeEditorBase. (#3013) - Changed
NetworkManagerEditorso it now derives fromNetcodeEditorBase. (#3013)
1.11.0
[1.11.0] - 2024-08-20
Added
- Added
NetworkVariable.CheckDirtyStatethat is to be used in tandem with collections in order to detect whether the collection or an item within the collection has changed. (#3005)
Fixed
- Fixed issue by adding null checks in
NetworkVariableBase.CanClientReadandNetworkVariableBase.CanClientWritemethods to ensure safe access toNetworkBehaviour. (#3011) - Fixed issue using collections within
NetworkVariablewhere the collection would not detect changes to items or nested items. (#3005) - Fixed issue where
List,Dictionary, andHashSetcollections would not uniquely duplicate nested collections. (#3005) - Fixed Issue where a state with dual triggers, inbound and outbound, could cause a false layer to layer state transition message to be sent to non-authority
NetworkAnimatorinstances and cause a warning message to be logged. (#2999) - Fixed issue where
FixedStringSerializer<T>was usingNetworkVariableSerialization<byte>.AreEqualto determine if two bytes were equal causes an exception to be thrown due to no byte serializer having been defined. (#2992)
Changed
- Changed permissions exception thrown in
NetworkListto exiting early with a logged error that is now a unified permissions message withinNetworkVariableBase. (#3005) - Changed permissions exception thrown in
NetworkVariable.Valueto exiting early with a logged error that is now a unified permissions message withinNetworkVariableBase. (#3005)