Skip to content

Commit d9a09a3

Browse files
chore: merge 1.12.1 and 1.12.2 into develop (#3213)
* update incrementing to v1.12.1 * update Setting changelog unreleased entries section to patch v1.12.1. * update adding unreleased section to changelog. * update Replace the two places where Debug.Assert is used in UnityTransport to be DEBUG wrapped checks that log warnings as opposed to throwing asserts in order to avoid being considered a failed test run even if all tests have passed. * style Cleaning up message a bit. * chore: validate 1.12.2 (#3215) * update Updating package and changelog. * test Changing what log message type we are expecting. * test Forgot to update message. * Update CHANGELOG.md Adding unreleased entry
1 parent c032b55 commit d9a09a3

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ Additional documentation and release notes are available at [Multiplayer Documen
1212

1313
### Fixed
1414

15+
### Changed
16+
17+
18+
## [1.12.2] - 2025-01-17
19+
20+
### Fixed
21+
1522
- Fixed issue where `NetworkVariableBase` derived classes were not being re-initialized if the associated `NetworkObject` instance was not destroyed and re-spawned. (#3217)
1623
- Fixed issue where a spawned `NetworkObject` that 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 the `NetworkObject` was still spawned. (#3202)
1724
- Fixed issue where `NetworkRigidBody2D` was still using the deprecated `isKinematic` property in Unity versions 2022.3 and newer. (#3199)
1825
- Fixed issue where an exception was thrown when calling `NetworkManager.Shutdown` after calling `UnityTransport.Shutdown`. (#3118)
1926

20-
### Changed
2127

2228
- Changed the `NetworkTimeSystem.Sync` method to use half RTT to calculate the desired local time offset as opposed to the full RTT. (#3206)
2329

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,13 @@ public override void DisconnectLocalClient()
11671167
/// <param name="clientId">The client to disconnect</param>
11681168
public override void DisconnectRemoteClient(ulong clientId)
11691169
{
1170-
Debug.Assert(m_State == State.Listening, "DisconnectRemoteClient should be called on a listening server");
1170+
#if DEBUG
1171+
if (m_State != State.Listening)
1172+
{
1173+
Debug.LogWarning($"{nameof(DisconnectRemoteClient)} should only be called on a listening server!");
1174+
return;
1175+
}
1176+
#endif
11711177

11721178
if (m_State == State.Listening)
11731179
{
@@ -1239,7 +1245,13 @@ public NetworkEndpoint GetEndpoint(ulong clientId)
12391245
/// <param name="networkManager">The NetworkManager that initialized and owns the transport</param>
12401246
public override void Initialize(NetworkManager networkManager = null)
12411247
{
1242-
Debug.Assert(sizeof(ulong) == UnsafeUtility.SizeOf<NetworkConnection>(), "Netcode connection id size does not match UTP connection id size");
1248+
#if DEBUG
1249+
if (sizeof(ulong) != UnsafeUtility.SizeOf<NetworkConnection>())
1250+
{
1251+
Debug.LogWarning($"Netcode connection id size {sizeof(ulong)} does not match UTP connection id size {UnsafeUtility.SizeOf<NetworkConnection>()}!");
1252+
return;
1253+
}
1254+
#endif
12431255

12441256
NetworkManager = networkManager;
12451257

com.unity.netcode.gameobjects/Tests/Runtime/Transports/UnityTransportTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ public IEnumerator DoesNotActAfterShutdown([Values] AfterShutdownAction afterShu
547547
{
548548
m_Server.DisconnectRemoteClient(m_Client1.ServerClientId);
549549

550-
LogAssert.Expect(LogType.Assert, "DisconnectRemoteClient should be called on a listening server");
550+
LogAssert.Expect(LogType.Warning, $"{nameof(UnityTransport.DisconnectRemoteClient)} should only be called on a listening server!");
551551
}
552552
else if (afterShutdownAction == AfterShutdownAction.DisconnectLocalClient)
553553
{

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": "1.12.0",
5+
"version": "1.12.2",
66
"unity": "2021.3",
77
"dependencies": {
88
"com.unity.nuget.mono-cecil": "1.10.1",

0 commit comments

Comments
 (0)