Skip to content

Commit c661768

Browse files
feat: upgrade project to NGO v1.6.0 [MTT-6875] (#865)
* upgrade project to NGO v1.6.0 * creating version define for NGO versions of range 1.5.2 to 1.6.0 & excluding single failing test * code standards pass * changelog addition * adding more context * more context
1 parent 20b94c6 commit c661768

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
@@ -12,6 +12,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
1212
* Upgraded editor version to 2022.3.7f1 (#855)
1313
* Upgraded Authentication Service package to v2.7.1
1414
* Upgraded Wire Service package to v1.2.0
15+
* Upgraded Boss Room to Netcode for GameObjects v1.6.0 (#865)
16+
* 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.
1517

1618
### Fixed
1719
* 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)