Skip to content

Commit f6a6c1f

Browse files
chore: merge 2.3.0 back to develop-2.0.0 (#3390)
This PR merges the changes made to the v2.3.0 branch back into develop-2.0.0 while also adding an unreleased section in the changelog. ## Changelog NA ## Testing and Documentation - No tests have been added. - No documentation changes or additions were necessary. <!-- Uncomment and mark items off with a * if this PR deprecates any API: ### Deprecated API - [ ] An `[Obsolete]` attribute was added along with a `(RemovedAfter yyyy-mm-dd)` entry. - [ ] An [api updater] was added. - [ ] Deprecation of the API is explained in the CHANGELOG. - [ ] The users can understand why this API was removed and what they should use instead. -->
1 parent e45e3b9 commit f6a6c1f

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ Additional documentation and release notes are available at [Multiplayer Documen
88

99
## [Unreleased]
1010

11+
### Added
12+
13+
14+
### Fixed
15+
16+
17+
### Changed
18+
19+
20+
21+
## [2.3.0] - 2025-04-09
22+
1123
### Added
1224

1325
- Added `NetworkManager.OnPreShutdown` which is called before the NetworkManager cleans up and shuts down. (#3366)

com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected internal struct BufferedItem
101101
public double TimeSent;
102102

103103
/// <summary>
104-
/// The constructor.
104+
/// Constructor that accepts an item identifier.
105105
/// </summary>
106106
/// <param name="item">The item value.</param>
107107
/// <param name="timeSent">The time the item was sent.</param>
@@ -112,6 +112,19 @@ public BufferedItem(T item, double timeSent, int itemId)
112112
TimeSent = timeSent;
113113
ItemId = itemId;
114114
}
115+
116+
/// <summary>
117+
/// The original constructor.
118+
/// </summary>
119+
/// <param name="item">The item value.</param>
120+
/// <param name="timeSent">The time the item was sent.</param>
121+
public BufferedItem(T item, double timeSent)
122+
{
123+
Item = item;
124+
TimeSent = timeSent;
125+
// Generate a unique item id based on the time to the 2nd decimal place
126+
ItemId = (int)(timeSent * 100);
127+
}
115128
}
116129

117130
/// <summary>

com.unity.netcode.gameobjects/Tests/Runtime/NetworkVisibilityTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ public IEnumerator HideShowAndDeleteTest()
8787
sessionOwnerNetworkObject.NetworkShow(m_ClientNetworkManagers[clientIndex].LocalClientId);
8888
sessionOwnerNetworkObject.Despawn(true);
8989

90-
// Expect no exceptions
91-
yield return s_DefaultWaitForTick;
90+
// Expect no exceptions while waiting to show the object and wait for the client id to be removed
91+
yield return WaitForConditionOrTimeOut(() => !m_SessionOwner.SpawnManager.ObjectsToShowToClient.ContainsKey(m_ClientNetworkManagers[clientIndex].LocalClientId));
92+
AssertOnTimeout($"Timed out waiting for client-{m_ClientNetworkManagers[clientIndex].LocalClientId} to be removed from the {nameof(NetworkSpawnManager.ObjectsToShowToClient)} table!");
9293

9394
// Now force a scenario where it normally would have caused an exception
9495
m_SessionOwner.SpawnManager.ObjectsToShowToClient.Add(m_ClientNetworkManagers[clientIndex].LocalClientId, new System.Collections.Generic.List<NetworkObject>());

com.unity.netcode.gameobjects/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "com.unity.netcode.gameobjects",
33
"displayName": "Netcode for GameObjects",
44
"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.",
5-
"version": "2.2.0",
5+
"version": "2.3.0",
66
"unity": "6000.0",
77
"dependencies": {
88
"com.unity.nuget.mono-cecil": "1.11.4",

0 commit comments

Comments
 (0)