Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ Additional documentation and release notes are available at [Multiplayer Documen

## [Unreleased]

### Added


### Fixed


### Changed



## [2.3.0] - 2025-04-09

### Added

- Added `NetworkManager.OnPreShutdown` which is called before the NetworkManager cleans up and shuts down. (#3366)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected internal struct BufferedItem
public double TimeSent;

/// <summary>
/// The constructor.
/// Constructor that accepts an item identifier.
/// </summary>
/// <param name="item">The item value.</param>
/// <param name="timeSent">The time the item was sent.</param>
Expand All @@ -112,6 +112,19 @@ public BufferedItem(T item, double timeSent, int itemId)
TimeSent = timeSent;
ItemId = itemId;
}

/// <summary>
/// The original constructor.
/// </summary>
/// <param name="item">The item value.</param>
/// <param name="timeSent">The time the item was sent.</param>
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);
}
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<NetworkObject>());
Expand Down
2 changes: 1 addition & 1 deletion com.unity.netcode.gameobjects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down