From e8a5d747ec25982335913d17acb9f349bf5420f4 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Wed, 9 Apr 2025 17:52:20 -0500 Subject: [PATCH 1/4] update Marking changelog for 2.3.0. Updating the package version to 2.3.0. --- com.unity.netcode.gameobjects/CHANGELOG.md | 2 +- com.unity.netcode.gameobjects/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index c4edcc652c..44c9e0f645 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). -## [Unreleased] +## [2.3.0] - 2025-04-09 ### Added diff --git a/com.unity.netcode.gameobjects/package.json b/com.unity.netcode.gameobjects/package.json index c20e366c3c..b8b6581016 100644 --- a/com.unity.netcode.gameobjects/package.json +++ b/com.unity.netcode.gameobjects/package.json @@ -2,7 +2,7 @@ "name": "com.unity.netcode.gameobjects", "displayName": "Netcode for GameObjects", "description": "Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.", - "version": "2.2.0", + "version": "2.3.0", "unity": "6000.0", "dependencies": { "com.unity.nuget.mono-cecil": "1.11.4", From 6d5c59f44c5c72d4fad752630938efdbbf59c294 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Thu, 10 Apr 2025 10:44:24 -0500 Subject: [PATCH 2/4] fix Adding back the original constructor for BufferedItem. --- .../Interpolator/BufferedLinearInterpolator.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs b/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs index b07eca8250..f96bb55392 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs @@ -101,7 +101,7 @@ protected internal struct BufferedItem public double TimeSent; /// - /// The constructor. + /// Constructor that accepts an item identifier. /// /// The item value. /// The time the item was sent. @@ -112,6 +112,19 @@ public BufferedItem(T item, double timeSent, int itemId) TimeSent = timeSent; ItemId = itemId; } + + /// + /// The original constructor. + /// + /// The item value. + /// The time the item was sent. + public BufferedItem(T item, double timeSent) + { + Item = item; + TimeSent = timeSent; + // Generate a unique item id based on the time to the 2nd decimal place + ItemId = (int)(timeSent * 100); + } } /// From 91fdad0d5a57c12e18599de07d6961a320f977b6 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Thu, 10 Apr 2025 15:51:50 -0500 Subject: [PATCH 3/4] test - fix Fixing an issue where it was possible for the NetworkVisibility test to fail if it didn't wait long enough for the message to be processed and the player id removed from the NetworkSpawnManager.ObjectsToShowToClient table. --- .../Tests/Runtime/NetworkVisibilityTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVisibilityTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVisibilityTests.cs index a19f856ad1..670bd9d091 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVisibilityTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/NetworkVisibilityTests.cs @@ -87,8 +87,9 @@ public IEnumerator HideShowAndDeleteTest() sessionOwnerNetworkObject.NetworkShow(m_ClientNetworkManagers[clientIndex].LocalClientId); sessionOwnerNetworkObject.Despawn(true); - // Expect no exceptions - yield return s_DefaultWaitForTick; + // Expect no exceptions while waiting to show the object and wait for the client id to be removed + yield return WaitForConditionOrTimeOut(() => !m_SessionOwner.SpawnManager.ObjectsToShowToClient.ContainsKey(m_ClientNetworkManagers[clientIndex].LocalClientId)); + AssertOnTimeout($"Timed out waiting for client-{m_ClientNetworkManagers[clientIndex].LocalClientId} to be removed from the {nameof(NetworkSpawnManager.ObjectsToShowToClient)} table!"); // Now force a scenario where it normally would have caused an exception m_SessionOwner.SpawnManager.ObjectsToShowToClient.Add(m_ClientNetworkManagers[clientIndex].LocalClientId, new System.Collections.Generic.List()); From 62fba652465f59e1b5cb3d4ce66fdef4fe21056c Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Fri, 11 Apr 2025 15:41:47 -0500 Subject: [PATCH 4/4] update adding unreleased to change log --- com.unity.netcode.gameobjects/CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 44c9e0f645..93ed4d1732 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). +## [Unreleased] + +### Added + + +### Fixed + + +### Changed + + + ## [2.3.0] - 2025-04-09 ### Added