Skip to content

Commit 0ff4b9b

Browse files
Merge branch 'develop' into fix/replace-null-coalescence-operators
2 parents 155fe33 + c661768 commit 0ff4b9b

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

Assets/Tests/Runtime/ConnectionManagementTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public override void LoadScene(string sceneName, bool useNetworkSceneManager, Lo
6767
ConnectionManager[] m_ClientConnectionManagers;
6868
ConnectionManager m_ServerConnectionManager;
6969

70-
7170
protected override bool CanStartServerAndClients()
7271
{
7372
return false;
@@ -154,6 +153,7 @@ protected override IEnumerator OnTearDown()
154153
{
155154
GameObject.DestroyImmediate(sceneGameObject);
156155
}
156+
157157
yield return base.OnTearDown();
158158
}
159159

@@ -285,6 +285,7 @@ public IEnumerator AttemptingToConnectWithSamePlayerId_ClientsDisconnectedWithRe
285285

286286
// The first client should be able to connect
287287
Assert.IsTrue(m_ClientNetworkManagers[0].IsConnectedClient, "The first client is not connected.");
288+
288289
// Every other client should get their connection denied
289290
for (var i = 1; i < NumberOfClients; i++)
290291
{
@@ -356,6 +357,7 @@ public IEnumerator UnexpectedClientDisconnect_ClientReconnectingSuccessfully()
356357
subscriptions.Dispose();
357358
}
358359

360+
#if !NETCODEFORGAMEOBJECTS_1_5_2_OR_1_6_0
359361
[UnityTest]
360362
public IEnumerator UnexpectedServerShutdown_ClientsFailToReconnect()
361363
{
@@ -435,6 +437,7 @@ public IEnumerator UnexpectedServerShutdown_ClientsFailToReconnect()
435437
Assert.AreEqual(NumberOfClients, nbGenericDisconnectMsgReceived, "Not all clients received a GenericDisconnect message.");
436438
subscriptions.Dispose();
437439
}
440+
#endif
438441

439442
[UnityTest]
440443
public IEnumerator ClientAndHostChangingRolesBetweenSessions_Success()
@@ -508,6 +511,7 @@ public IEnumerator ClientCancellingWhileConnectingToNonExistingServer_NoConnecti
508511
{
509512
m_ClientConnectionManagers[i].StartClientIp($"client{i}", "127.0.0.1", 9998);
510513
}
514+
511515
m_ClientConnectionManagers[0].RequestShutdown();
512516

513517
for (var i = 1; i < NumberOfClients; i++)
@@ -523,6 +527,5 @@ public IEnumerator ClientCancellingWhileConnectingToNonExistingServer_NoConnecti
523527
Assert.IsFalse(m_ClientNetworkManagers[i].IsConnectedClient, $"Client{i} is connected while no server is running.");
524528
}
525529
}
526-
527530
}
528531
}

Assets/Tests/Runtime/Unity.BossRoom.Tests.Runtime.asmdef

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
"defineConstraints": [
2929
"UNITY_INCLUDE_TESTS"
3030
],
31-
"versionDefines": [],
31+
"versionDefines": [
32+
{
33+
"name": "com.unity.netcode.gameobjects",
34+
"expression": "[1.5.2,1.6.0]",
35+
"define": "NETCODEFORGAMEOBJECTS_1_5_2_OR_1_6_0"
36+
}
37+
],
3238
"noEngineReferences": false
33-
}
39+
}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
1313
* Upgraded Authentication Service package to v2.7.1
1414
* Upgraded Wire Service package to v1.2.0
1515
* Replaced usages of null-coalescing and null-conditional operators with regular null checks. (#867) These operators can cause issues when used with types inheriting UnityEngine.Object because that type redefines the == operator to define when an object is null. This redefinition applies to regular null checks (if foo == null) but not to those operators, thus this could lead to unexpected behaviour. While those operators were safely used within Boss Room, only with types that were not inheriting UnityEngine.Object, we decided to remove most usages for consistency. This will also help avoid accidental mistakes, such as a user reusing a part of this code, but modifying it so that one of those operators are used with a UnityEngine.Object.
16+
* Upgraded Boss Room to Netcode for GameObjects v1.6.0 (#865)
17+
* A package Version Define has been created for Netcode for GameObjects v.1.5.2 - v1.6.0. Recent refactorings to NetworkManager's shutdown have prevented the ability to invoke CustomMessages when OnClientDisconnected callbacks are invoked during a shutdown as host. This regression has caused one of our runtime tests, namely Unity.BossRoom.Tests.Runtime.ConnectionManagementTests.UnexpectedServerShutdown_ClientsFailToReconnect, to fail and it does not impact gameplay. This is a known issue and will be addressed in a future NGO version.
1618

1719
### Fixed
1820
* Fixed colliders on diagonal walls to not have negative scale (#854).

Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"com.unity.learn.iet-framework": "3.1.3",
1111
"com.unity.memoryprofiler": "1.0.0",
1212
"com.unity.multiplayer.tools": "2.0.0-pre.3",
13-
"com.unity.netcode.gameobjects": "1.4.0",
13+
"com.unity.netcode.gameobjects": "1.6.0",
1414
"com.unity.performance.profile-analyzer": "1.2.2",
1515
"com.unity.postprocessing": "3.2.2",
1616
"com.unity.render-pipelines.universal": "14.0.8",

Packages/packages-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@
143143
"url": "https://packages.unity.com"
144144
},
145145
"com.unity.netcode.gameobjects": {
146-
"version": "1.4.0",
146+
"version": "1.6.0",
147147
"depth": 0,
148148
"source": "registry",
149149
"dependencies": {
150150
"com.unity.nuget.mono-cecil": "1.10.1",
151-
"com.unity.transport": "1.3.3"
151+
"com.unity.transport": "1.3.4"
152152
},
153153
"url": "https://packages.unity.com"
154154
},

0 commit comments

Comments
 (0)