Skip to content

Releases: Unity-Technologies/com.unity.netcode.gameobjects

v2.5.0

21 Aug 10:07
Compare
Choose a tag to compare

🎉 Netcode for GameObjects v2.5.0 📦 is now publicly available 👉 (CHANGELOG)

Added

  • Added AsNativeArray() read‑only accessor to NetworkList (#3567)
  • Added serializer for Pose (#3546)
  • Added AttachableBehaviour helper component to provide an alternate approach to parenting items without using the NetworkObject parenting. (#3518)
  • Added AttachableNode helper component that is used by AttachableBehaviour as the target node for parenting. (#3518)
  • Added ComponentController helper component that can be used to synchronize the enabling and disabling of components and can be used in conjunction with AttachableBehaviour. (#3518)
  • Added NetworkBehaviour.OnNetworkPreDespawn that is invoked before running through the despawn sequence for the NetworkObject and all NetworkBehaviour children of the NetworkObject being despawned. (#3518)
  • Added methods GetDefaultNetworkSettings and GetDefaultPipelineConfigurations to UnityTransport. These can be used to retrieve the default settings and pipeline stages that are used by UnityTransport. This is useful when providing a custom driver constructor through UnityTransport.s_DriverConstructor, since it allows reusing or tuning the existing configuration instead of trying to recreate it. This means a transport with a custom driver can now easily benefit from most of the features of UnityTransport, like integration with the Network Simulator and Network Profiler from the multiplayer tools package. (#3501)
  • Added mappings between ClientId and TransportId. (#3516)
  • Added NetworkPrefabInstanceHandlerWithData, a variant of INetworkPrefabInstanceHandler that provides access to custom instantiation data directly within the Instantiate() method. (#3497)

Fixed

  • Removed allocation to the heap in NetworkBehaviourUpdate. (#3573)
  • Fixed issue where NetworkConfig.ConnectionData could cause the ConnectionRequestMessage to exceed the transport's MTU size and would result in a buffer overflow error. (#3564)
  • Fixed regression issue in v2.x where NetworkObject.GetNetworkBehaviourAtOrderIndex was converted from public to internal. (#3541)
  • Fixed ensuring OnValueChanged callback is still triggered on the authority when a collection changes and then reverts to the previous value in the same frame. (#3539)
  • Fixed synchronizing the destroyGameObject parameter to clients for InScenePlaced network objects. (#3514)
  • Fixed distributed authority related issue where enabling the NetworkObject.DestroyWithScene would cause errors when a destroying non-authority instances due to loading (single mode) or unloading scene events. (#3500)
  • Fixed an issue where UnityTransport would not accept single words as valid hostnames (notably "localhost"). (#3591)
  • Fixed issue where viewing a NetworkBehaviour with one or more NetworkVariable fields could throw an exception if running a distributed authority network topology with a local (DAHost) host and viewed on the host when the host is not the authority of the associated NetworkObject. (#3578)
  • Fixed issue when using a distributed authority network topology and viewing a NetworkBehaviour with one or more NetworkVariable fields in the inspector view would not show editable fields. (#3578)
  • Fixed issue with unnecessary internal GC Allocations when using the IReadOnlyList NetworkManager.ConnectedClientsIds within a foreach statement by either replacing with a for loop or directly referencing the NetworkConnectionManager.ConnectedClientIds. (#3527)

Changed

  • Marked UnityTransport.ConnectionAddressData.ServerEndPoint as obsolete. It can't work when using hostnames as the server address, and its functionality can easily be replicated using NetworkEndpoint.Parse. (#3591)
  • Optimized NetworkList indexer setter to skip operations when the new value equals the existing value, improving performance by avoiding unnecessary list events and network synchronization. (#3587)

1.14.0

31 Jul 14:09
Compare
Choose a tag to compare

[1.14.0] - 2025-07-21

Added

  • Added serializer for Pose (#3540)
  • Added mappings between ClientId and TransportId. (#3515)
  • Added SinglePlayerTransport that provides the ability to start as a host for a single player network session. (#3475)
  • 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. (#3440)

Fixed

  • Fixed NullReferenceException on NetworkList when used without a NetworkManager in scene. (#3502)
  • Fixed inconsistencies in the OnSceneEvent callback. (#3487)
  • Fixed issue where NetworkClient could persist some settings if re-using the same NetworkManager instance. (#3494)
  • Fixed issue where a pooled NetworkObject was not resetting the internal latest parent property when despawned. (#3494)
  • Fixed issue where the initial client synchronization pre-serialization process was not excluding spawned NetworkObjects that already had pending visibility for the client being synchronized. (#3493)
  • Fixed issue where invoking NetworkObject.NetworkShow and NetworkObject.ChangeOwnership consecutively within the same call stack location could result in an unnecessary change in ownership error message generated on the target client side. (#3493)
  • Fixed issue where NetworkVariables on a NetworkBehaviour could fail to synchronize changes if one has NetworkVariableUpdateTraits set and is dirty but is not ready to send. (#3465)
  • Fixed issue where when a client changes ownership via RPC the NetworkBehaviour.OnOwnershipChanged can result in identical previous and current owner identifiers. (#3434)

2.4.4

21 Jul 08:20
f4d9185
Compare
Choose a tag to compare

[2.4.4] - 2025-07-07

Added

  • Added documentation to package repository.

1.13.1

21 Jul 08:19
7771224
Compare
Choose a tag to compare

[1.13.1] - 2025-07-07

Added

  • Added documentation to package repository.

2.4.3

27 Jun 13:19
31017e2
Compare
Choose a tag to compare

[2.4.3] - 2025-06-27

Fixed

  • Fixed issue where spawned objects with NetworkObject.DontDestroyWithOwner set to false would not be destroyed when using a client-server network topology. (#3522)

2.4.2

16 Jun 16:30
7bbc1c3
Compare
Choose a tag to compare

[2.4.2] - 2025-06-13

Fixed

  • Fixed NullReferenceException on NetworkList when used without a NetworkManager in scene. (#3503)
  • Fixed issue where NetworkClient could persist some settings if re-using the same NetworkManager instance. (#3491)
  • Fixed issue where a pooled NetworkObject was not resetting the internal latest parent property when despawned. (#3491)
  • Fixed issue where the initial client synchronization pre-serialization process was not excluding spawned NetworkObject instances that already had pending visibility for the client being synchronized. (#3488)
  • Fixed issue where there was a potential for a small memory leak in the ConnectionApprovedMessage. (#3486)

2.4.1

16 Jun 16:27
Compare
Choose a tag to compare

[2.4.1] - 2025-06-11

Added

  • Added: Full XML API documentation coverage primarily focused around the test helpers API. (#3444)

Changed

  • Changed: Assembly names while keeping the same namespaces. If your project is using the Unity.Netcode.TestHelpers.Runtime assembly then you need to switch asmdef references to Unity.Netcode.Runtime.Tests. (#3444)
  • Changed: Migrated multiplayer metrics tests to Multiplayer Tools repository and removed the multiplayer tools test project. (#3444)

2.4.0

05 Jun 14:16
Compare
Choose a tag to compare

[2.4.0] - 2025-06-02

Added

  • Added SinglePlayerTransport that 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.DontDestroyWithOwner was not being honored. (#3477)
  • Fixed issue where non-authority NetworkTransform instances would not allow non-synchronized axis values to be updated locally. (#3471)
  • Fixed issue where invoking NetworkObject.NetworkShow and NetworkObject.ChangeOwnership consecutively 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 a NetworkBehaviour could fail to synchronize changes if one has NetworkVariableUpdateTraits set and is dirty but is not ready to send. (#3466)
  • Fixed issue with the Distributed Authority connection sequence with scene management enabled where the ClientConnected event was fired before the client was synchronized. (#3459)
  • Fixed inconsistencies in the OnSceneEvent callback. (#3458)
  • Fixed issues with the NetworkBehaviour and NetworkVariable length 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

01 May 09:06
Compare
Choose a tag to compare

[1.13.0] - 2025-04-30

Added

  • Added NetworkManager.OnPreShutdown which is called before the NetworkManager cleans up and shuts down. (#3358)
  • Added FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator) constructor that uses the ArraySegment.Offset as the FastBufferReader offset and the ArraySegment.Count as the FastBufferReader length. (#3320)
  • Added FastBufferReader(ArraySegment<byte> buffer, Allocator copyAllocator, int length = -1) constructor that uses the ArraySegment.Offset as the FastBufferReader offset. (#3320)

Fixed

  • Fixed memory leaks when domain reload is disabled. (#3428)
  • Fixed issues with the NetworkBehaviour and NetworkVariable length safety checks. (#3415)
  • Fixed issue where during a NetworkObject's spawn if you instantiated, spawned, and parented another network prefab under the currently spawning NetworkObject the parenting message would not properly defer until the parent NetworkObject was spawned. (#3403)
  • Fixed issue where in-scene placed NetworkObjects could fail to synchronize its transform properly (especially without a NetworkTransform) 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 UnityTransport where the transport would accept sends on invalid connections, leading to a useless memory allocation and confusing error message. (#3383)
  • Fixed issue where NetworkAnimator would log an error if there was no destination transition information. (#3384)
  • Fixed initial NetworkTransform spawn, ensure it uses world space. (#3361)
  • Fixed issue where AnticipatedNetworkVariable previous value returned by AnticipatedNetworkVariable.OnAuthoritativeValueChanged is updated correctly on the non-authoritative side. (#3322)

Changed

  • Changed the scene loading event serialization order for in-scene placed NetworkObjects to be based on their parent-child hierarchy. (#3388)

2.3.2

01 May 09:10
Compare
Choose a tag to compare

[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 NetworkObjects would only allow the ownership permission to be no less than distributable or sessionowner. (#3407)