From 55c71ff55c8e80f867286bf580ac09c8811e2054 Mon Sep 17 00:00:00 2001 From: Emma Date: Fri, 23 May 2025 20:33:27 -0400 Subject: [PATCH 01/17] fix: DA client connection flow --- .../Runtime/Configuration/SessionConfig.cs | 3 +- .../Connection/NetworkConnectionManager.cs | 72 ++++-- .../SceneManagement/NetworkSceneManager.cs | 17 +- .../Runtime/NetcodeIntegrationTest.cs | 6 + .../SceneManagementSynchronizationTests.cs | 244 ++++++++++++++++++ ...ceneManagementSynchronizationTests.cs.meta | 3 + 6 files changed, 307 insertions(+), 38 deletions(-) create mode 100644 testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs create mode 100644 testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs.meta diff --git a/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs b/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs index aabc18dfc1..feba82d994 100644 --- a/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs +++ b/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs @@ -10,9 +10,10 @@ internal class SessionConfig public const uint ServerDistributionCompatible = 2; public const uint SessionStateToken = 3; public const uint NetworkBehaviourSerializationSafety = 4; + public const uint FixConnectionFlow = 5; // The most current session version (!!!!set this when you increment!!!!!) - public static uint PackageSessionVersion => NetworkBehaviourSerializationSafety; + public static uint PackageSessionVersion => FixConnectionFlow; internal uint SessionVersion; diff --git a/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs b/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs index 59a187a5fc..e88df5fbe6 100644 --- a/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs @@ -28,6 +28,7 @@ public enum ConnectionEvent /// On the server side, the will be the ID of the client that just connected. /// ClientConnected, + /// /// This event is set on clients that are already connected to the session. /// @@ -35,6 +36,7 @@ public enum ConnectionEvent /// The will be the ID of the client that just connected. /// PeerConnected, + /// /// This event is set on the client-side of the client that disconnected client and on the server-side. /// @@ -43,6 +45,7 @@ public enum ConnectionEvent /// On the server side, this will be the ID of the client that disconnected. /// ClientDisconnected, + /// /// This event is set on clients that are already connected to the session. /// @@ -133,48 +136,49 @@ internal void InvokeOnClientConnectedCallback(ulong clientId) Debug.LogException(exception); } - if (!NetworkManager.IsServer) + if (NetworkManager.IsServer || NetworkManager.LocalClient.IsSessionOwner) { - var peerClientIds = new NativeArray(Math.Max(NetworkManager.ConnectedClientsIds.Count - 1, 0), Allocator.Temp); - // `using var peerClientIds` or `using(peerClientIds)` renders it immutable... - using var sentinel = peerClientIds; - - var idx = 0; - foreach (var peerId in NetworkManager.ConnectedClientsIds) - { - if (peerId == NetworkManager.LocalClientId) - { - continue; - } - - // This assures if the server has not timed out prior to the client synchronizing that it doesn't exceed the allocated peer count. - if (peerClientIds.Length > idx) - { - peerClientIds[idx] = peerId; - ++idx; - } - } - try { - OnConnectionEvent?.Invoke(NetworkManager, new ConnectionEventData { ClientId = NetworkManager.LocalClientId, EventType = ConnectionEvent.ClientConnected, PeerClientIds = peerClientIds }); + OnConnectionEvent?.Invoke(NetworkManager, new ConnectionEventData { ClientId = clientId, EventType = ConnectionEvent.ClientConnected }); } catch (Exception exception) { Debug.LogException(exception); } + + return; } - else + + // Invoking connection event on NonAuthority client. Need to calculate PeerIds. + var peerClientIds = new NativeArray(Math.Max(NetworkManager.ConnectedClientsIds.Count - 1, 0), Allocator.Temp); + // `using var peerClientIds` or `using(peerClientIds)` renders it immutable... + using var sentinel = peerClientIds; + + var idx = 0; + foreach (var peerId in NetworkManager.ConnectedClientsIds) { - try + if (peerId == NetworkManager.LocalClientId) { - OnConnectionEvent?.Invoke(NetworkManager, new ConnectionEventData { ClientId = clientId, EventType = ConnectionEvent.ClientConnected }); + continue; } - catch (Exception exception) + + // This assures if the server has not timed out prior to the client synchronizing that it doesn't exceed the allocated peer count. + if (peerClientIds.Length > idx) { - Debug.LogException(exception); + peerClientIds[idx] = peerId; + ++idx; } } + + try + { + OnConnectionEvent?.Invoke(NetworkManager, new ConnectionEventData { ClientId = NetworkManager.LocalClientId, EventType = ConnectionEvent.ClientConnected, PeerClientIds = peerClientIds }); + } + catch (Exception exception) + { + Debug.LogException(exception); + } } internal void InvokeOnClientDisconnectCallback(ulong clientId) @@ -853,6 +857,7 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne }; } } + if (!MockSkippingApproval) { SendMessage(ref message, NetworkDelivery.ReliableFragmentedSequenced, ownerClientId); @@ -861,6 +866,7 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne { NetworkLog.LogInfo("Mocking server not responding with connection approved..."); } + message.MessageVersions.Dispose(); message.ConnectedClientIds.Dispose(); if (MockSkippingApproval) @@ -877,8 +883,8 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne { InvokeOnPeerConnectedCallback(ownerClientId); } - NetworkManager.SpawnManager.DistributeNetworkObjects(ownerClientId); + NetworkManager.SpawnManager.DistributeNetworkObjects(ownerClientId); } else // Otherwise, let NetworkSceneManager handle the initial scene and NetworkObject synchronization { @@ -921,6 +927,7 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne { return; } + // Separating this into a contained function call for potential further future separation of when this notification is sent. ApprovedPlayerSpawn(ownerClientId, response.PlayerPrefabHash ?? NetworkManager.NetworkConfig.PlayerPrefab.GetComponent().GlobalObjectIdHash); } @@ -935,6 +942,7 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne SendMessage(ref disconnectReason, NetworkDelivery.Reliable, ownerClientId); MessageManager.ProcessSendQueues(); } + DisconnectRemoteClient(ownerClientId); } } @@ -1009,12 +1017,14 @@ internal NetworkClient AddClient(ulong clientId) { networkClient = new NetworkClient(); } + networkClient.SetRole(clientId == NetworkManager.ServerClientId, isClient: true, NetworkManager); networkClient.ClientId = clientId; if (!ConnectedClients.ContainsKey(clientId)) { ConnectedClients.Add(clientId, networkClient); } + if (!ConnectedClientsList.Contains(networkClient)) { ConnectedClientsList.Add(networkClient); @@ -1038,6 +1048,7 @@ internal NetworkClient AddClient(ulong clientId) NetworkManager.MessageManager.SendMessage(ref message, NetworkDelivery.ReliableSequenced, NetworkManager.CurrentSessionOwner); } } + if (!ConnectedClientIds.Contains(clientId)) { ConnectedClientIds.Add(clientId); @@ -1063,6 +1074,7 @@ internal NetworkClient AddClient(ulong clientId) { continue; } + networkObject.Observers.Add(clientId); } } @@ -1080,6 +1092,7 @@ internal void RemoveClient(ulong clientId) { ConnectedClientIds.Remove(clientId); } + if (ConnectedClients.ContainsKey(clientId)) { ConnectedClientsList.Remove(ConnectedClients[clientId]); @@ -1186,6 +1199,7 @@ internal void OnClientDisconnectFromServer(ulong clientId) // Don't destroy (prefab handler will determine this, but always notify NetworkManager.SpawnManager.DespawnObject(ownedObject, false, true); } + NetworkManager.PrefabHandler.HandleNetworkPrefabDestroy(ownedObject); } else @@ -1225,6 +1239,7 @@ internal void OnClientDisconnectFromServer(ulong clientId) break; } } + if (EnableDistributeLogging) { Debug.Log($"[Disconnected][Client-{clientId}][NetworkObjectId-{ownedObject.NetworkObjectId} Distributed to Client-{targetOwner}"); @@ -1247,6 +1262,7 @@ internal void OnClientDisconnectFromServer(ulong clientId) { continue; } + // If the client owner disconnected, it is ok to unlock this at this point in time. if (childObject.IsOwnershipLocked) { diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index b904056c8a..55623f183b 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -2603,14 +2603,6 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) // Mark this client as being connected NetworkManager.ConnectedClients[clientId].IsConnected = true; - // Notify the local server that a client has finished synchronizing - OnSceneEvent?.Invoke(new SceneEvent() - { - SceneEventType = sceneEventData.SceneEventType, - SceneName = string.Empty, - ClientId = clientId - }); - // For non-authority clients in a distributed authority session, we show hidden objects, // we distribute NetworkObjects, and then we end the scene event. if (NetworkManager.DistributedAuthorityMode && !NetworkManager.LocalClient.IsSessionOwner) @@ -2630,6 +2622,13 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) } // All scenes are synchronized, let the server know we are done synchronizing + + // Notify the local server that a client has finished synchronizing + OnSceneEvent?.Invoke(new SceneEvent() + { + SceneEventType = sceneEventData.SceneEventType, + ClientId = clientId + }); OnSynchronizeComplete?.Invoke(clientId); // At this time the client is fully synchronized with all loaded scenes and @@ -2637,7 +2636,7 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) // notification that the client is connected. NetworkManager.ConnectionManager.InvokeOnClientConnectedCallback(clientId); - if (NetworkManager.IsHost) + if (NetworkManager.IsHost || NetworkManager.LocalClient.IsSessionOwner) { NetworkManager.ConnectionManager.InvokeOnPeerConnectedCallback(clientId); } diff --git a/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs b/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs index ea3d919228..eaff3d8435 100644 --- a/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs +++ b/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs @@ -206,6 +206,12 @@ protected NetworkManager GetAuthorityNetworkManager() /// A instance that will not be the session owner protected NetworkManager GetNonAuthorityNetworkManager() { + // If we haven't even started any NetworkManager, then return the assumed first non-authority NetworkManager + if (!NetcodeIntegrationTestHelpers.IsStarted) + { + return m_UseCmbService ? m_ClientNetworkManagers[1] : m_ClientNetworkManagers[0]; + } + return m_ClientNetworkManagers.First(client => !client.LocalClient.IsSessionOwner); } diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs new file mode 100644 index 0000000000..8e9d4742d1 --- /dev/null +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs @@ -0,0 +1,244 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; +using Unity.Collections; +using Unity.Netcode; +using Unity.Netcode.TestHelpers.Runtime; +using UnityEngine.TestTools; + +namespace TestProject.RuntimeTests +{ + [TestFixture(HostOrServer.Host)] + [TestFixture(HostOrServer.Server)] + [TestFixture(HostOrServer.DAHost)] + public class SceneManagementSynchronizationTests : NetcodeIntegrationTest + { + protected override int NumberOfClients => 1; + + + public SceneManagementSynchronizationTests(HostOrServer hostOrServer) : base(hostOrServer) + { + } + + private struct ExpectedEvent + { + public SceneEvent SceneEvent; + public ConnectionEventData ConnectionEvent; + } + + private readonly Queue m_ExpectedEventQueue = new(); + + private static int s_NumEventsProcessed; + + private void OnSceneEvent(SceneEvent sceneEvent) + { + VerboseDebug($"OnSceneEvent! Type: {sceneEvent.SceneEventType}."); + AssertEventMatchesExpectedEvent(expectedEvent => + ValidateSceneEventsAreEqual(expectedEvent, sceneEvent), sceneEvent.SceneEventType); + } + + private void OnConnectionEvent(NetworkManager manager, ConnectionEventData eventData) + { + VerboseDebug($"OnConnectionEvent! Type: {eventData.EventType} - Client-{eventData.ClientId}"); + AssertEventMatchesExpectedEvent(expectedEvent => + ValidateConnectionEventsAreEqual(expectedEvent, eventData), eventData.EventType); + } + + private void AssertEventMatchesExpectedEvent(Action predicate, T eventType) + { + if (m_ExpectedEventQueue.Count > 0) + { + var expectedEvent = m_ExpectedEventQueue.Dequeue(); + predicate(expectedEvent); + } + else + { + Assert.Fail($"Received unexpected event at index {s_NumEventsProcessed}: {eventType}"); + } + + s_NumEventsProcessed++; + } + + private NetworkManager m_ManagerToTest; + + private void SetManagerToTest(NetworkManager manager) + { + m_ManagerToTest = manager; + m_ManagerToTest.OnConnectionEvent += OnConnectionEvent; + m_ManagerToTest.SceneManager.OnSceneEvent += OnSceneEvent; + } + + protected override void OnNewClientStarted(NetworkManager networkManager) + { + // If m_ManagerToTest isn't set at this point, it means we are testing the newly created NetworkManager + if (m_ManagerToTest == null) + { + SetManagerToTest(networkManager); + } + base.OnNewClientCreated(networkManager); + } + + protected override IEnumerator OnTearDown() + { + m_ManagerToTest.OnConnectionEvent -= OnConnectionEvent; + m_ManagerToTest.SceneManager.OnSceneEvent -= OnSceneEvent; + m_ManagerToTest = null; + m_ExpectedEventQueue.Clear(); + s_NumEventsProcessed = 0; + + yield return base.OnTearDown(); + } + + [UnityTest] + public IEnumerator SynchronizationCallbacks_Authority() + { + SetManagerToTest(GetAuthorityNetworkManager()); + + // Calculate the expected ID of the newly connecting networkManager + var expectedClientId = GetNonAuthorityNetworkManager().LocalClientId + 1; + + // Setup expected events + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + SceneEvent = new SceneEvent() + { + SceneEventType = SceneEventType.Synchronize, + ClientId = expectedClientId + }, + }); + + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + SceneEvent = new SceneEvent() + { + SceneEventType = SceneEventType.SynchronizeComplete, + ClientId = expectedClientId, + }, + }); + + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + ConnectionEvent = new ConnectionEventData() + { + EventType = ConnectionEvent.ClientConnected, + ClientId = expectedClientId, + } + }); + + if (m_UseHost) + { + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + ConnectionEvent = new ConnectionEventData() + { + EventType = ConnectionEvent.PeerConnected, + ClientId = expectedClientId, + } + }); + } + + m_EnableVerboseDebug = true; + ////////////////////////////////////////// + // Testing event notifications + yield return CreateAndStartNewClient(); + yield return null; + + Assert.IsEmpty(m_ExpectedEventQueue, "Not all expected callbacks were received"); + } + + [UnityTest] + public IEnumerator SynchronizationCallbacks_NonAuthority() + { + var authorityId = GetAuthorityNetworkManager().LocalClientId; + var peerClientId = GetNonAuthorityNetworkManager().LocalClientId; + var expectedClientId = peerClientId + 1; + + var expectedPeerClientIds = m_UseHost ? new[] { authorityId, peerClientId } : new[]{peerClientId}; + + // Setup expected events + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + ConnectionEvent = new ConnectionEventData() + { + EventType = ConnectionEvent.ClientConnected, + ClientId = expectedClientId, + PeerClientIds = new NativeArray(expectedPeerClientIds.ToArray(), Allocator.Persistent), + } + }); + + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + SceneEvent = new SceneEvent() + { + SceneEventType = SceneEventType.SynchronizeComplete, + ClientId = expectedClientId, + }, + }); + + Assert.Null(m_ManagerToTest, "m_ManagerToTest should be null as we should be testing newly created client"); + + ////////////////////////////////////////// + // Testing event notifications + + // CreateAndStartNewClient will configure m_ManagerToTest inside OnNewClientStarted + yield return CreateAndStartNewClient(); + yield return null; + + Assert.IsEmpty(m_ExpectedEventQueue, "Not all expected callbacks were received"); + } + + [UnityTest] + public IEnumerator LateJoiningClient_PeerCallbacks() + { + SetManagerToTest(GetNonAuthorityNetworkManager()); + // Setup expected events + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + ConnectionEvent = new ConnectionEventData() + { + EventType = ConnectionEvent.PeerConnected, + ClientId = m_ManagerToTest.LocalClientId + 1, + } + }); + + ////////////////////////////////////////// + // Testing event notifications + yield return CreateAndStartNewClient(); + yield return null; + + Assert.IsEmpty(m_ExpectedEventQueue, "Not all expected callbacks were received"); + } + + private static void ValidateSceneEventsAreEqual(ExpectedEvent expectedEvent, SceneEvent sceneEvent) + { + Assert.NotNull(expectedEvent.SceneEvent, $"Received unexpected scene event {sceneEvent.SceneEventType} at index {s_NumEventsProcessed}"); + AssertField(expectedEvent.SceneEvent.SceneEventType, sceneEvent.SceneEventType, nameof(sceneEvent.SceneEventType), sceneEvent.SceneEventType); + AssertField(expectedEvent.SceneEvent.ClientId, sceneEvent.ClientId, nameof(sceneEvent.ClientId), sceneEvent.SceneEventType); + } + + private static void ValidateConnectionEventsAreEqual(ExpectedEvent expectedEvent, ConnectionEventData eventData) + { + Assert.NotNull(expectedEvent.ConnectionEvent, $"Received unexpected connection event {eventData.EventType} at index {s_NumEventsProcessed}"); + AssertField(expectedEvent.ConnectionEvent.EventType, eventData.EventType, nameof(eventData.EventType), eventData.EventType); + AssertField(expectedEvent.ConnectionEvent.ClientId, eventData.ClientId, nameof(eventData.ClientId), eventData.EventType); + + AssertField(expectedEvent.ConnectionEvent.PeerClientIds.Length, eventData.PeerClientIds.Length, "length of PeerClientIds", eventData.EventType); + if (eventData.PeerClientIds.Length > 0) + { + var peerIds = eventData.PeerClientIds.ToArray(); + foreach (var expectedClientId in expectedEvent.ConnectionEvent.PeerClientIds) + { + Assert.Contains(expectedClientId, peerIds, "PeerClientIds does not contain all expected client IDs."); + } + } + } + + private static void AssertField(T expected, T actual, string fieldName, TK type) + { + Assert.AreEqual(expected, actual, $"Failed on event {s_NumEventsProcessed} - {type}. Incorrect {fieldName}"); + } + + } +} diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs.meta b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs.meta new file mode 100644 index 0000000000..d55a1846fe --- /dev/null +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d9899540f0bc4d4d9ea04614092d3696 +timeCreated: 1747946029 \ No newline at end of file From 62baf60ba80420d08230a876bc469eac952a3316 Mon Sep 17 00:00:00 2001 From: Emma Date: Fri, 23 May 2025 20:38:28 -0400 Subject: [PATCH 02/17] Fix whitespace issues --- .../Connection/NetworkConnectionManager.cs | 19 ++----------------- .../SceneManagementSynchronizationTests.cs | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs b/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs index e88df5fbe6..4d48074d3f 100644 --- a/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs @@ -28,7 +28,6 @@ public enum ConnectionEvent /// On the server side, the will be the ID of the client that just connected. /// ClientConnected, - /// /// This event is set on clients that are already connected to the session. /// @@ -36,7 +35,6 @@ public enum ConnectionEvent /// The will be the ID of the client that just connected. /// PeerConnected, - /// /// This event is set on the client-side of the client that disconnected client and on the server-side. /// @@ -45,7 +43,6 @@ public enum ConnectionEvent /// On the server side, this will be the ID of the client that disconnected. /// ClientDisconnected, - /// /// This event is set on clients that are already connected to the session. /// @@ -150,7 +147,7 @@ internal void InvokeOnClientConnectedCallback(ulong clientId) return; } - // Invoking connection event on NonAuthority client. Need to calculate PeerIds. + // Invoking connection event on non-authority local client. Need to calculate PeerIds. var peerClientIds = new NativeArray(Math.Max(NetworkManager.ConnectedClientsIds.Count - 1, 0), Allocator.Temp); // `using var peerClientIds` or `using(peerClientIds)` renders it immutable... using var sentinel = peerClientIds; @@ -857,7 +854,6 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne }; } } - if (!MockSkippingApproval) { SendMessage(ref message, NetworkDelivery.ReliableFragmentedSequenced, ownerClientId); @@ -866,7 +862,6 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne { NetworkLog.LogInfo("Mocking server not responding with connection approved..."); } - message.MessageVersions.Dispose(); message.ConnectedClientIds.Dispose(); if (MockSkippingApproval) @@ -883,8 +878,8 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne { InvokeOnPeerConnectedCallback(ownerClientId); } - NetworkManager.SpawnManager.DistributeNetworkObjects(ownerClientId); + } else // Otherwise, let NetworkSceneManager handle the initial scene and NetworkObject synchronization { @@ -927,7 +922,6 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne { return; } - // Separating this into a contained function call for potential further future separation of when this notification is sent. ApprovedPlayerSpawn(ownerClientId, response.PlayerPrefabHash ?? NetworkManager.NetworkConfig.PlayerPrefab.GetComponent().GlobalObjectIdHash); } @@ -942,7 +936,6 @@ internal void HandleConnectionApproval(ulong ownerClientId, NetworkManager.Conne SendMessage(ref disconnectReason, NetworkDelivery.Reliable, ownerClientId); MessageManager.ProcessSendQueues(); } - DisconnectRemoteClient(ownerClientId); } } @@ -1017,14 +1010,12 @@ internal NetworkClient AddClient(ulong clientId) { networkClient = new NetworkClient(); } - networkClient.SetRole(clientId == NetworkManager.ServerClientId, isClient: true, NetworkManager); networkClient.ClientId = clientId; if (!ConnectedClients.ContainsKey(clientId)) { ConnectedClients.Add(clientId, networkClient); } - if (!ConnectedClientsList.Contains(networkClient)) { ConnectedClientsList.Add(networkClient); @@ -1048,7 +1039,6 @@ internal NetworkClient AddClient(ulong clientId) NetworkManager.MessageManager.SendMessage(ref message, NetworkDelivery.ReliableSequenced, NetworkManager.CurrentSessionOwner); } } - if (!ConnectedClientIds.Contains(clientId)) { ConnectedClientIds.Add(clientId); @@ -1074,7 +1064,6 @@ internal NetworkClient AddClient(ulong clientId) { continue; } - networkObject.Observers.Add(clientId); } } @@ -1092,7 +1081,6 @@ internal void RemoveClient(ulong clientId) { ConnectedClientIds.Remove(clientId); } - if (ConnectedClients.ContainsKey(clientId)) { ConnectedClientsList.Remove(ConnectedClients[clientId]); @@ -1199,7 +1187,6 @@ internal void OnClientDisconnectFromServer(ulong clientId) // Don't destroy (prefab handler will determine this, but always notify NetworkManager.SpawnManager.DespawnObject(ownedObject, false, true); } - NetworkManager.PrefabHandler.HandleNetworkPrefabDestroy(ownedObject); } else @@ -1239,7 +1226,6 @@ internal void OnClientDisconnectFromServer(ulong clientId) break; } } - if (EnableDistributeLogging) { Debug.Log($"[Disconnected][Client-{clientId}][NetworkObjectId-{ownedObject.NetworkObjectId} Distributed to Client-{targetOwner}"); @@ -1262,7 +1248,6 @@ internal void OnClientDisconnectFromServer(ulong clientId) { continue; } - // If the client owner disconnected, it is ok to unlock this at this point in time. if (childObject.IsOwnershipLocked) { diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs index 8e9d4742d1..8126e45cd1 100644 --- a/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs @@ -155,7 +155,7 @@ public IEnumerator SynchronizationCallbacks_NonAuthority() var peerClientId = GetNonAuthorityNetworkManager().LocalClientId; var expectedClientId = peerClientId + 1; - var expectedPeerClientIds = m_UseHost ? new[] { authorityId, peerClientId } : new[]{peerClientId}; + var expectedPeerClientIds = m_UseHost ? new[] { authorityId, peerClientId } : new[] { peerClientId }; // Setup expected events m_ExpectedEventQueue.Enqueue(new ExpectedEvent() From d8012d1e22b3586f0cd5d00574f1900d9a5f3117 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 28 May 2025 14:43:31 -0400 Subject: [PATCH 03/17] Move expected message to ConnectionApproved --- .../Runtime/Messaging/Messages/ClientConnectedMessage.cs | 8 ++++---- .../Messaging/Messages/ConnectionApprovedMessage.cs | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs index 2d01389cd0..7ca610f82a 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs @@ -31,10 +31,10 @@ public bool Deserialize(FastBufferReader reader, ref NetworkContext context, int public void Handle(ref NetworkContext context) { var networkManager = (NetworkManager)context.SystemOwner; - if (ShouldSynchronize && networkManager.NetworkConfig.EnableSceneManagement && networkManager.DistributedAuthorityMode && networkManager.LocalClient.IsSessionOwner) - { - networkManager.SceneManager.SynchronizeNetworkObjects(ClientId); - } + // if (ShouldSynchronize && networkManager.NetworkConfig.EnableSceneManagement && networkManager.DistributedAuthorityMode && networkManager.LocalClient.IsSessionOwner) + // { + // networkManager.SceneManager.SynchronizeNetworkObjects(ClientId); + // } else { // All modes support adding NetworkClients diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs index 807429fdb8..ea1d44eec6 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs @@ -250,6 +250,13 @@ public void Handle(ref NetworkContext context) { NetworkLog.LogInfo($"[Client-{OwnerClientId}] Connection approved! Synchronizing..."); } + + if (networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner) + { + networkManager.SceneManager.SynchronizeNetworkObjects(OwnerClientId); + return; + } + networkManager.LocalClientId = OwnerClientId; networkManager.MessageManager.SetLocalClientId(networkManager.LocalClientId); networkManager.NetworkMetrics.SetConnectionId(networkManager.LocalClientId); From f5671fac3a82be3de66087642d46b41d37d09e0f Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 28 May 2025 14:46:12 -0400 Subject: [PATCH 04/17] Fix compilation errors --- .../Runtime/Messaging/Messages/ClientConnectedMessage.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs index 7ca610f82a..28c6a610fb 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs @@ -31,10 +31,10 @@ public bool Deserialize(FastBufferReader reader, ref NetworkContext context, int public void Handle(ref NetworkContext context) { var networkManager = (NetworkManager)context.SystemOwner; - // if (ShouldSynchronize && networkManager.NetworkConfig.EnableSceneManagement && networkManager.DistributedAuthorityMode && networkManager.LocalClient.IsSessionOwner) - // { - // networkManager.SceneManager.SynchronizeNetworkObjects(ClientId); - // } + if (ShouldSynchronize && networkManager.NetworkConfig.EnableSceneManagement && networkManager.DistributedAuthorityMode && networkManager.LocalClient.IsSessionOwner) + { + // networkManager.SceneManager.SynchronizeNetworkObjects(ClientId); + } else { // All modes support adding NetworkClients From f3ea82cdb9fbd106dfc02e94d92bd7959d13f6f7 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 28 May 2025 14:58:46 -0400 Subject: [PATCH 05/17] Fix OnVerifyCanReceive --- .../Runtime/Messaging/NetworkManagerHooks.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs index e8a60b9f28..a413788ec7 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs @@ -76,6 +76,7 @@ public bool OnVerifyCanReceive(ulong senderId, Type messageType, FastBufferReade if (m_NetworkManager.ConnectedClients.TryGetValue(senderId, out NetworkClient connectedClient) && messageType == typeof(ConnectionRequestMessage)) { + if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) { var transportErrorMsg = GetTransportErrorMessage(messageContent, m_NetworkManager); @@ -98,7 +99,7 @@ public bool OnVerifyCanReceive(ulong senderId, Type messageType, FastBufferReade return false; } - if (m_NetworkManager.IsConnectedClient && messageType == typeof(ConnectionApprovedMessage)) + if (m_NetworkManager.IsConnectedClient && messageType == typeof(ConnectionApprovedMessage) && !(m_NetworkManager.CMBServiceConnection && m_NetworkManager.LocalClient.IsSessionOwner)) { if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) { From 65ceb5e42faa2cddfc2652526e1736968bb45ec1 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 28 May 2025 15:15:54 -0400 Subject: [PATCH 06/17] only send SynchronizeComplete to the rust --- .../SceneManagement/NetworkSceneManager.cs | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index 55623f183b..cc95e1b67e 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -2406,27 +2406,6 @@ private void HandleClientSceneEvent(uint sceneEventId) sceneEventData.SceneEventType = SceneEventType.SynchronizeComplete; if (NetworkManager.DistributedAuthorityMode) { - if (NetworkManager.CMBServiceConnection) - { - foreach (var clientId in NetworkManager.ConnectedClientsIds) - { - if (clientId == NetworkManager.LocalClientId) - { - continue; - } - sceneEventData.TargetClientId = clientId; - sceneEventData.SenderClientId = NetworkManager.LocalClientId; - var message = new SceneEventMessage - { - EventData = sceneEventData, - }; - var target = NetworkManager.DAHost ? NetworkManager.CurrentSessionOwner : NetworkManager.ServerClientId; - var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, target); - NetworkManager.NetworkMetrics.TrackSceneEventSent(target, (uint)sceneEventData.SceneEventType, SceneNameFromHash(sceneEventData.SceneHash), size); - } - } - else - { sceneEventData.TargetClientId = NetworkManager.CurrentSessionOwner; sceneEventData.SenderClientId = NetworkManager.LocalClientId; var message = new SceneEventMessage @@ -2436,7 +2415,6 @@ private void HandleClientSceneEvent(uint sceneEventId) var target = NetworkManager.DAHost ? NetworkManager.CurrentSessionOwner : NetworkManager.ServerClientId; var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, target); NetworkManager.NetworkMetrics.TrackSceneEventSent(target, (uint)sceneEventData.SceneEventType, SceneNameFromHash(sceneEventData.SceneHash), size); - } } else { From 94b4b85559db71245e7375f2ac71f073646f9eea Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 28 May 2025 15:20:01 -0400 Subject: [PATCH 07/17] remove duplicate peer connected callback --- .../Runtime/SceneManagement/NetworkSceneManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index cc95e1b67e..ae053548ea 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -2614,7 +2614,7 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) // notification that the client is connected. NetworkManager.ConnectionManager.InvokeOnClientConnectedCallback(clientId); - if (NetworkManager.IsHost || NetworkManager.LocalClient.IsSessionOwner) + if (NetworkManager.IsHost) { NetworkManager.ConnectionManager.InvokeOnPeerConnectedCallback(clientId); } From a093781b0757eafd4216cf9049468bf31623bd8c Mon Sep 17 00:00:00 2001 From: "unity-renovate[bot]" <120015202+unity-renovate[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 13:38:00 +0200 Subject: [PATCH 08/17] chore(deps): update dependency recipeengine.modules.wrench to 0.10.50 (develop-2.0.0) (#3461) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | RecipeEngine.Modules.Wrench | nuget | patch | `0.10.49` -> `0.10.50` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Unity Renovate Bot](https://internaldocs.unity.com/renovate/). ## Backport https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/3460#pullrequestreview-2874656403 Co-authored-by: unity-renovate[bot] <120015202+unity-renovate[bot]@users.noreply.github.com> --- .yamato/wrench/api-validation-jobs.yml | 6 +-- .yamato/wrench/package-pack-jobs.yml | 2 +- .yamato/wrench/preview-a-p-v.yml | 74 +++++++++++++------------- .yamato/wrench/promotion-jobs.yml | 12 ++--- .yamato/wrench/recipe-regeneration.yml | 2 +- .yamato/wrench/validation-jobs.yml | 72 ++++++++++++------------- .yamato/wrench/wrench_config.json | 2 +- Tools/CI/NGO.Cookbook.csproj | 2 +- 8 files changed, 86 insertions(+), 86 deletions(-) diff --git a/.yamato/wrench/api-validation-jobs.yml b/.yamato/wrench/api-validation-jobs.yml index d3f2087deb..96d85e8608 100644 --- a/.yamato/wrench/api-validation-jobs.yml +++ b/.yamato/wrench/api-validation-jobs.yml @@ -13,7 +13,7 @@ api_validation_-_netcode_gameobjects_-_6000_0_-_windows: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -51,8 +51,8 @@ api_validation_-_netcode_gameobjects_-_6000_0_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml index 398bb91986..4cf269f829 100644 --- a/.yamato/wrench/package-pack-jobs.yml +++ b/.yamato/wrench/package-pack-jobs.yml @@ -24,5 +24,5 @@ package_pack_-_netcode_gameobjects: UPMCI_ACK_LARGE_PACKAGE: 1 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 diff --git a/.yamato/wrench/preview-a-p-v.yml b/.yamato/wrench/preview-a-p-v.yml index e7e273bcc3..3efdc5082e 100644 --- a/.yamato/wrench/preview-a-p-v.yml +++ b/.yamato/wrench/preview-a-p-v.yml @@ -19,7 +19,7 @@ all_preview_apv_jobs: - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_3_-_windows metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.0 manifest (MacOS). preview_apv_-_6000_0_-_macos: @@ -29,7 +29,7 @@ preview_apv_-_6000_0_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -70,10 +70,10 @@ preview_apv_-_6000_0_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.0 manifest (Ubuntu). preview_apv_-_6000_0_-_ubuntu: @@ -83,7 +83,7 @@ preview_apv_-_6000_0_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -124,10 +124,10 @@ preview_apv_-_6000_0_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.0 manifest (Windows). preview_apv_-_6000_0_-_windows: @@ -138,7 +138,7 @@ preview_apv_-_6000_0_-_windows: flavor: b1.large commands: - command: gsudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -179,10 +179,10 @@ preview_apv_-_6000_0_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.1 manifest (MacOS). preview_apv_-_6000_1_-_macos: @@ -192,7 +192,7 @@ preview_apv_-_6000_1_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -233,10 +233,10 @@ preview_apv_-_6000_1_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.1 manifest (Ubuntu). preview_apv_-_6000_1_-_ubuntu: @@ -246,7 +246,7 @@ preview_apv_-_6000_1_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -287,10 +287,10 @@ preview_apv_-_6000_1_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.1 manifest (Windows). preview_apv_-_6000_1_-_windows: @@ -301,7 +301,7 @@ preview_apv_-_6000_1_-_windows: flavor: b1.large commands: - command: gsudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -342,10 +342,10 @@ preview_apv_-_6000_1_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.2 manifest (MacOS). preview_apv_-_6000_2_-_macos: @@ -355,7 +355,7 @@ preview_apv_-_6000_2_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -396,10 +396,10 @@ preview_apv_-_6000_2_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.2 manifest (Ubuntu). preview_apv_-_6000_2_-_ubuntu: @@ -409,7 +409,7 @@ preview_apv_-_6000_2_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -450,10 +450,10 @@ preview_apv_-_6000_2_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.2 manifest (Windows). preview_apv_-_6000_2_-_windows: @@ -464,7 +464,7 @@ preview_apv_-_6000_2_-_windows: flavor: b1.large commands: - command: gsudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -505,10 +505,10 @@ preview_apv_-_6000_2_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.3 manifest (MacOS). preview_apv_-_6000_3_-_macos: @@ -518,7 +518,7 @@ preview_apv_-_6000_3_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -559,10 +559,10 @@ preview_apv_-_6000_3_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.3 manifest (Ubuntu). preview_apv_-_6000_3_-_ubuntu: @@ -572,7 +572,7 @@ preview_apv_-_6000_3_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -613,10 +613,10 @@ preview_apv_-_6000_3_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Functional tests for dependents found in the latest 6000.3 manifest (Windows). preview_apv_-_6000_3_-_windows: @@ -627,7 +627,7 @@ preview_apv_-_6000_3_-_windows: flavor: b1.large commands: - command: gsudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -668,8 +668,8 @@ preview_apv_-_6000_3_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 diff --git a/.yamato/wrench/promotion-jobs.yml b/.yamato/wrench/promotion-jobs.yml index ae72a0b4ce..634a1852ec 100644 --- a/.yamato/wrench/promotion-jobs.yml +++ b/.yamato/wrench/promotion-jobs.yml @@ -9,7 +9,7 @@ publish_dry_run_netcode_gameobjects: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -148,10 +148,10 @@ publish_dry_run_netcode_gameobjects: ignore_artifact: true variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 # Publish for netcode.gameobjects to https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-npm publish_netcode_gameobjects: @@ -161,7 +161,7 @@ publish_netcode_gameobjects: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -300,8 +300,8 @@ publish_netcode_gameobjects: ignore_artifact: true variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 diff --git a/.yamato/wrench/recipe-regeneration.yml b/.yamato/wrench/recipe-regeneration.yml index 288e81425d..f4d6902bf2 100644 --- a/.yamato/wrench/recipe-regeneration.yml +++ b/.yamato/wrench/recipe-regeneration.yml @@ -26,5 +26,5 @@ test_-_wrench_jobs_up_to_date: cancel_old_ci: true metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 diff --git a/.yamato/wrench/validation-jobs.yml b/.yamato/wrench/validation-jobs.yml index a9c2058d13..c81cf50082 100644 --- a/.yamato/wrench/validation-jobs.yml +++ b/.yamato/wrench/validation-jobs.yml @@ -9,7 +9,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -60,10 +60,10 @@ validate_-_netcode_gameobjects_-_6000_0_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -75,7 +75,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -126,10 +126,10 @@ validate_-_netcode_gameobjects_-_6000_0_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -141,7 +141,7 @@ validate_-_netcode_gameobjects_-_6000_0_-_windows: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -192,10 +192,10 @@ validate_-_netcode_gameobjects_-_6000_0_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -207,7 +207,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -258,10 +258,10 @@ validate_-_netcode_gameobjects_-_6000_1_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -273,7 +273,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -324,10 +324,10 @@ validate_-_netcode_gameobjects_-_6000_1_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -339,7 +339,7 @@ validate_-_netcode_gameobjects_-_6000_1_-_windows: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -390,10 +390,10 @@ validate_-_netcode_gameobjects_-_6000_1_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -405,7 +405,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -456,10 +456,10 @@ validate_-_netcode_gameobjects_-_6000_2_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -471,7 +471,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -522,10 +522,10 @@ validate_-_netcode_gameobjects_-_6000_2_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -537,7 +537,7 @@ validate_-_netcode_gameobjects_-_6000_2_-_windows: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -588,10 +588,10 @@ validate_-_netcode_gameobjects_-_6000_2_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -603,7 +603,7 @@ validate_-_netcode_gameobjects_-_6000_3_-_macos: type: Unity::VM::osx flavor: b1.xlarge commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -654,10 +654,10 @@ validate_-_netcode_gameobjects_-_6000_3_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -669,7 +669,7 @@ validate_-_netcode_gameobjects_-_6000_3_-_ubuntu: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -720,10 +720,10 @@ validate_-_netcode_gameobjects_-_6000_3_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects @@ -735,7 +735,7 @@ validate_-_netcode_gameobjects_-_6000_3_-_windows: type: Unity::VM flavor: b1.large commands: - - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-65_ac171f692eb27799bebcfb16c910f460486bef87e3068ae3a38793f908011de4.zip -o wrench-localapv.zip + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-68_53c92d3b34ce3f4b652c9785dd1530bdc5885f6523465d6969c3be91f9ccaaf1.zip -o wrench-localapv.zip - command: 7z x -aoa wrench-localapv.zip - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple - command: python PythonScripts/print_machine_info.py @@ -786,10 +786,10 @@ validate_-_netcode_gameobjects_-_6000_3_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.49.0 + UPMPVP_CONTEXT_WRENCH: 0.10.50.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.49.0 + Wrench: 0.10.50.0 labels: - Packages:netcode.gameobjects diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json index b6a0ff62a0..06f8a12ba9 100644 --- a/.yamato/wrench/wrench_config.json +++ b/.yamato/wrench/wrench_config.json @@ -31,7 +31,7 @@ }, "publishing_job": ".yamato/wrench/promotion-jobs.yml#publish_netcode_gameobjects", "branch_pattern": "ReleaseSlash", - "wrench_version": "0.10.49.0", + "wrench_version": "0.10.50.0", "pvp_exemption_path": ".yamato/wrench/pvp-exemptions.json", "cs_project_path": "Tools\\CI\\NGO.Cookbook.csproj" } \ No newline at end of file diff --git a/Tools/CI/NGO.Cookbook.csproj b/Tools/CI/NGO.Cookbook.csproj index e6d32661b9..3483a59284 100644 --- a/Tools/CI/NGO.Cookbook.csproj +++ b/Tools/CI/NGO.Cookbook.csproj @@ -8,7 +8,7 @@ - + From 87854c4c3215e730e10c104219a5afee2df4d6c8 Mon Sep 17 00:00:00 2001 From: "unity-renovate[bot]" <120015202+unity-renovate[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 17:34:38 +0200 Subject: [PATCH 09/17] chore(deps): update dependency recipeengine.modules.wrench to 0.11.1 (develop-2.0.0) (#3464) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | RecipeEngine.Modules.Wrench | nuget | minor | `0.10.50` -> `0.11.1` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Unity Renovate Bot](https://internaldocs.unity.com/renovate/). ## Backport https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/3463 Co-authored-by: unity-renovate[bot] <120015202+unity-renovate[bot]@users.noreply.github.com> --- .yamato/wrench/api-validation-jobs.yml | 4 +-- .yamato/wrench/package-pack-jobs.yml | 2 +- .yamato/wrench/preview-a-p-v.yml | 50 +++++++++++++------------- .yamato/wrench/promotion-jobs.yml | 8 ++--- .yamato/wrench/recipe-regeneration.yml | 2 +- .yamato/wrench/validation-jobs.yml | 48 ++++++++++++------------- .yamato/wrench/wrench_config.json | 2 +- Tools/CI/NGO.Cookbook.csproj | 2 +- 8 files changed, 59 insertions(+), 59 deletions(-) diff --git a/.yamato/wrench/api-validation-jobs.yml b/.yamato/wrench/api-validation-jobs.yml index 96d85e8608..637aae7aef 100644 --- a/.yamato/wrench/api-validation-jobs.yml +++ b/.yamato/wrench/api-validation-jobs.yml @@ -51,8 +51,8 @@ api_validation_-_netcode_gameobjects_-_6000_0_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml index 4cf269f829..390a72de7b 100644 --- a/.yamato/wrench/package-pack-jobs.yml +++ b/.yamato/wrench/package-pack-jobs.yml @@ -24,5 +24,5 @@ package_pack_-_netcode_gameobjects: UPMCI_ACK_LARGE_PACKAGE: 1 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 diff --git a/.yamato/wrench/preview-a-p-v.yml b/.yamato/wrench/preview-a-p-v.yml index 3efdc5082e..119ab17825 100644 --- a/.yamato/wrench/preview-a-p-v.yml +++ b/.yamato/wrench/preview-a-p-v.yml @@ -19,7 +19,7 @@ all_preview_apv_jobs: - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_3_-_windows metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.0 manifest (MacOS). preview_apv_-_6000_0_-_macos: @@ -70,10 +70,10 @@ preview_apv_-_6000_0_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.0 manifest (Ubuntu). preview_apv_-_6000_0_-_ubuntu: @@ -124,10 +124,10 @@ preview_apv_-_6000_0_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.0 manifest (Windows). preview_apv_-_6000_0_-_windows: @@ -179,10 +179,10 @@ preview_apv_-_6000_0_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.1 manifest (MacOS). preview_apv_-_6000_1_-_macos: @@ -233,10 +233,10 @@ preview_apv_-_6000_1_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.1 manifest (Ubuntu). preview_apv_-_6000_1_-_ubuntu: @@ -287,10 +287,10 @@ preview_apv_-_6000_1_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.1 manifest (Windows). preview_apv_-_6000_1_-_windows: @@ -342,10 +342,10 @@ preview_apv_-_6000_1_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.2 manifest (MacOS). preview_apv_-_6000_2_-_macos: @@ -396,10 +396,10 @@ preview_apv_-_6000_2_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.2 manifest (Ubuntu). preview_apv_-_6000_2_-_ubuntu: @@ -450,10 +450,10 @@ preview_apv_-_6000_2_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.2 manifest (Windows). preview_apv_-_6000_2_-_windows: @@ -505,10 +505,10 @@ preview_apv_-_6000_2_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.3 manifest (MacOS). preview_apv_-_6000_3_-_macos: @@ -559,10 +559,10 @@ preview_apv_-_6000_3_-_macos: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.3 manifest (Ubuntu). preview_apv_-_6000_3_-_ubuntu: @@ -613,10 +613,10 @@ preview_apv_-_6000_3_-_ubuntu: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Functional tests for dependents found in the latest 6000.3 manifest (Windows). preview_apv_-_6000_3_-_windows: @@ -668,8 +668,8 @@ preview_apv_-_6000_3_-_windows: dependencies: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 diff --git a/.yamato/wrench/promotion-jobs.yml b/.yamato/wrench/promotion-jobs.yml index 634a1852ec..d6cdacb77f 100644 --- a/.yamato/wrench/promotion-jobs.yml +++ b/.yamato/wrench/promotion-jobs.yml @@ -148,10 +148,10 @@ publish_dry_run_netcode_gameobjects: ignore_artifact: true variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 # Publish for netcode.gameobjects to https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-npm publish_netcode_gameobjects: @@ -300,8 +300,8 @@ publish_netcode_gameobjects: ignore_artifact: true variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 diff --git a/.yamato/wrench/recipe-regeneration.yml b/.yamato/wrench/recipe-regeneration.yml index f4d6902bf2..7d1707321a 100644 --- a/.yamato/wrench/recipe-regeneration.yml +++ b/.yamato/wrench/recipe-regeneration.yml @@ -26,5 +26,5 @@ test_-_wrench_jobs_up_to_date: cancel_old_ci: true metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 diff --git a/.yamato/wrench/validation-jobs.yml b/.yamato/wrench/validation-jobs.yml index c81cf50082..a9f9e2e06f 100644 --- a/.yamato/wrench/validation-jobs.yml +++ b/.yamato/wrench/validation-jobs.yml @@ -60,10 +60,10 @@ validate_-_netcode_gameobjects_-_6000_0_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -126,10 +126,10 @@ validate_-_netcode_gameobjects_-_6000_0_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -192,10 +192,10 @@ validate_-_netcode_gameobjects_-_6000_0_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -258,10 +258,10 @@ validate_-_netcode_gameobjects_-_6000_1_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -324,10 +324,10 @@ validate_-_netcode_gameobjects_-_6000_1_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -390,10 +390,10 @@ validate_-_netcode_gameobjects_-_6000_1_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -456,10 +456,10 @@ validate_-_netcode_gameobjects_-_6000_2_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -522,10 +522,10 @@ validate_-_netcode_gameobjects_-_6000_2_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -588,10 +588,10 @@ validate_-_netcode_gameobjects_-_6000_2_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -654,10 +654,10 @@ validate_-_netcode_gameobjects_-_6000_3_-_macos: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -720,10 +720,10 @@ validate_-_netcode_gameobjects_-_6000_3_-_ubuntu: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects @@ -786,10 +786,10 @@ validate_-_netcode_gameobjects_-_6000_3_-_windows: - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_netcode_gameobjects variables: UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 - UPMPVP_CONTEXT_WRENCH: 0.10.50.0 + UPMPVP_CONTEXT_WRENCH: 0.11.1.0 metadata: Job Maintainers: '#rm-packageworks' - Wrench: 0.10.50.0 + Wrench: 0.11.1.0 labels: - Packages:netcode.gameobjects diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json index 06f8a12ba9..272ca3a8c6 100644 --- a/.yamato/wrench/wrench_config.json +++ b/.yamato/wrench/wrench_config.json @@ -31,7 +31,7 @@ }, "publishing_job": ".yamato/wrench/promotion-jobs.yml#publish_netcode_gameobjects", "branch_pattern": "ReleaseSlash", - "wrench_version": "0.10.50.0", + "wrench_version": "0.11.1.0", "pvp_exemption_path": ".yamato/wrench/pvp-exemptions.json", "cs_project_path": "Tools\\CI\\NGO.Cookbook.csproj" } \ No newline at end of file diff --git a/Tools/CI/NGO.Cookbook.csproj b/Tools/CI/NGO.Cookbook.csproj index 3483a59284..09694ec4b0 100644 --- a/Tools/CI/NGO.Cookbook.csproj +++ b/Tools/CI/NGO.Cookbook.csproj @@ -8,7 +8,7 @@ - + From 059660a34a0eb04b9c1bc5bdf28ee53404f36b34 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 28 May 2025 16:48:54 -0400 Subject: [PATCH 10/17] Fix whitespace error --- .../SceneManagement/NetworkSceneManager.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index ae053548ea..1321bdd912 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -2406,15 +2406,15 @@ private void HandleClientSceneEvent(uint sceneEventId) sceneEventData.SceneEventType = SceneEventType.SynchronizeComplete; if (NetworkManager.DistributedAuthorityMode) { - sceneEventData.TargetClientId = NetworkManager.CurrentSessionOwner; - sceneEventData.SenderClientId = NetworkManager.LocalClientId; - var message = new SceneEventMessage - { - EventData = sceneEventData, - }; - var target = NetworkManager.DAHost ? NetworkManager.CurrentSessionOwner : NetworkManager.ServerClientId; - var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, target); - NetworkManager.NetworkMetrics.TrackSceneEventSent(target, (uint)sceneEventData.SceneEventType, SceneNameFromHash(sceneEventData.SceneHash), size); + sceneEventData.TargetClientId = NetworkManager.CurrentSessionOwner; + sceneEventData.SenderClientId = NetworkManager.LocalClientId; + var message = new SceneEventMessage + { + EventData = sceneEventData, + }; + var target = NetworkManager.DAHost ? NetworkManager.CurrentSessionOwner : NetworkManager.ServerClientId; + var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, target); + NetworkManager.NetworkMetrics.TrackSceneEventSent(target, (uint)sceneEventData.SceneEventType, SceneNameFromHash(sceneEventData.SceneHash), size); } else { From 37878654f8eb4ba721e6571a316e2486b56fca9c Mon Sep 17 00:00:00 2001 From: Emma Date: Thu, 29 May 2025 12:09:02 -0400 Subject: [PATCH 11/17] Remove unnecessary changes --- .../Runtime/Configuration/SessionConfig.cs | 3 +-- .../TestHelpers/Runtime/NetcodeIntegrationTest.cs | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs b/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs index feba82d994..aabc18dfc1 100644 --- a/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs +++ b/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs @@ -10,10 +10,9 @@ internal class SessionConfig public const uint ServerDistributionCompatible = 2; public const uint SessionStateToken = 3; public const uint NetworkBehaviourSerializationSafety = 4; - public const uint FixConnectionFlow = 5; // The most current session version (!!!!set this when you increment!!!!!) - public static uint PackageSessionVersion => FixConnectionFlow; + public static uint PackageSessionVersion => NetworkBehaviourSerializationSafety; internal uint SessionVersion; diff --git a/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs b/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs index eaff3d8435..ea3d919228 100644 --- a/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs +++ b/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs @@ -206,12 +206,6 @@ protected NetworkManager GetAuthorityNetworkManager() /// A instance that will not be the session owner protected NetworkManager GetNonAuthorityNetworkManager() { - // If we haven't even started any NetworkManager, then return the assumed first non-authority NetworkManager - if (!NetcodeIntegrationTestHelpers.IsStarted) - { - return m_UseCmbService ? m_ClientNetworkManagers[1] : m_ClientNetworkManagers[0]; - } - return m_ClientNetworkManagers.First(client => !client.LocalClient.IsSessionOwner); } From ba725dab7d4d7702a082b53d147bb09934a155e4 Mon Sep 17 00:00:00 2001 From: Emma Date: Thu, 29 May 2025 14:32:32 -0400 Subject: [PATCH 12/17] Fix tests --- .../Messages/ClientConnectedMessage.cs | 4 ++-- .../Messages/ConnectionApprovedMessage.cs | 5 ++++- .../Runtime/Messaging/NetworkManagerHooks.cs | 4 ++-- .../SceneManagement/NetworkSceneManager.cs | 18 ++++++++---------- .../ExtendedNetworkShowAndHideTests.cs | 16 +++++++++++----- .../SceneManagementSynchronizationTests.cs | 18 ++++++++++++++++-- 6 files changed, 43 insertions(+), 22 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs index 28c6a610fb..1fa9a93e53 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientConnectedMessage.cs @@ -31,9 +31,9 @@ public bool Deserialize(FastBufferReader reader, ref NetworkContext context, int public void Handle(ref NetworkContext context) { var networkManager = (NetworkManager)context.SystemOwner; - if (ShouldSynchronize && networkManager.NetworkConfig.EnableSceneManagement && networkManager.DistributedAuthorityMode && networkManager.LocalClient.IsSessionOwner) + if (ShouldSynchronize && networkManager.NetworkConfig.EnableSceneManagement && networkManager.DistributedAuthorityMode && !networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner) { - // networkManager.SceneManager.SynchronizeNetworkObjects(ClientId); + networkManager.SceneManager.SynchronizeNetworkObjects(ClientId); } else { diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs index ea1d44eec6..517fb340f6 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Unity.Collections; +using UnityEngine; namespace Unity.Netcode { @@ -251,7 +252,7 @@ public void Handle(ref NetworkContext context) NetworkLog.LogInfo($"[Client-{OwnerClientId}] Connection approved! Synchronizing..."); } - if (networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner) + if (networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner && networkManager.NetworkConfig.EnableSceneManagement && networkManager.LocalClientId != OwnerClientId) { networkManager.SceneManager.SynchronizeNetworkObjects(OwnerClientId); return; @@ -332,6 +333,7 @@ public void Handle(ref NetworkContext context) { NetworkLog.LogInfo($"[Client-{OwnerClientId}][Scene Management Disabled] Synchronization complete!"); } + // When scene management is disabled we notify after everything is synchronized networkManager.ConnectionManager.InvokeOnClientConnectedCallback(OwnerClientId); @@ -374,6 +376,7 @@ public void Handle(ref NetworkContext context) } } } + ConnectedClientIds.Dispose(); } } diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs index a413788ec7..05f0d2a2f0 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkManagerHooks.cs @@ -76,7 +76,6 @@ public bool OnVerifyCanReceive(ulong senderId, Type messageType, FastBufferReade if (m_NetworkManager.ConnectedClients.TryGetValue(senderId, out NetworkClient connectedClient) && messageType == typeof(ConnectionRequestMessage)) { - if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) { var transportErrorMsg = GetTransportErrorMessage(messageContent, m_NetworkManager); @@ -99,7 +98,8 @@ public bool OnVerifyCanReceive(ulong senderId, Type messageType, FastBufferReade return false; } - if (m_NetworkManager.IsConnectedClient && messageType == typeof(ConnectionApprovedMessage) && !(m_NetworkManager.CMBServiceConnection && m_NetworkManager.LocalClient.IsSessionOwner)) + if (m_NetworkManager.IsConnectedClient && messageType == typeof(ConnectionApprovedMessage) && + !(m_NetworkManager.CMBServiceConnection && m_NetworkManager.LocalClient.IsSessionOwner && m_NetworkManager.NetworkConfig.EnableSceneManagement)) { if (NetworkLog.CurrentLogLevel <= LogLevel.Normal) { diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index 1321bdd912..36efeeabed 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -2581,6 +2581,14 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) // Mark this client as being connected NetworkManager.ConnectedClients[clientId].IsConnected = true; + // Notify that a client has finished synchronizing + OnSceneEvent?.Invoke(new SceneEvent() + { + SceneEventType = sceneEventData.SceneEventType, + ClientId = clientId + }); + OnSynchronizeComplete?.Invoke(clientId); + // For non-authority clients in a distributed authority session, we show hidden objects, // we distribute NetworkObjects, and then we end the scene event. if (NetworkManager.DistributedAuthorityMode && !NetworkManager.LocalClient.IsSessionOwner) @@ -2599,16 +2607,6 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) return; } - // All scenes are synchronized, let the server know we are done synchronizing - - // Notify the local server that a client has finished synchronizing - OnSceneEvent?.Invoke(new SceneEvent() - { - SceneEventType = sceneEventData.SceneEventType, - ClientId = clientId - }); - OnSynchronizeComplete?.Invoke(clientId); - // At this time the client is fully synchronized with all loaded scenes and // NetworkObjects and should be considered "fully connected". Send the // notification that the client is connected. diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs index bb77ddf926..22328e2a9b 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs @@ -6,12 +6,18 @@ namespace Unity.Netcode.RuntimeTests { - [TestFixture(HostOrServer.DAHost, true)] - [TestFixture(HostOrServer.DAHost, false)] + [TestFixture(HostOrServer.DAHost, Config.SceneManagementEnabled)] + [TestFixture(HostOrServer.DAHost, Config.SceneManagementDisabled)] public class ExtendedNetworkShowAndHideTests : NetcodeIntegrationTest { + public enum Config + { + SceneManagementEnabled, + SceneManagementDisabled, + } + protected override int NumberOfClients => 3; - private bool m_EnableSceneManagement; + private readonly bool m_EnableSceneManagement; private GameObject m_ObjectToSpawn; private NetworkObject m_SpawnedObject; private NetworkManager m_ClientToHideFrom; @@ -25,9 +31,9 @@ protected override bool UseCMBService() return false; } - public ExtendedNetworkShowAndHideTests(HostOrServer hostOrServer, bool enableSceneManagement) : base(hostOrServer) + public ExtendedNetworkShowAndHideTests(HostOrServer hostOrServer, Config enableSceneManagement) : base(hostOrServer) { - m_EnableSceneManagement = enableSceneManagement; + m_EnableSceneManagement = enableSceneManagement == Config.SceneManagementEnabled; } protected override void OnServerAndClientsCreated() diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs index 8126e45cd1..1096bdfe71 100644 --- a/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/SceneManagementSynchronizationTests.cs @@ -192,14 +192,28 @@ public IEnumerator SynchronizationCallbacks_NonAuthority() [UnityTest] public IEnumerator LateJoiningClient_PeerCallbacks() { - SetManagerToTest(GetNonAuthorityNetworkManager()); + var nonAuthority = GetNonAuthorityNetworkManager(); + var expectedClientId = nonAuthority.LocalClientId + 1; + SetManagerToTest(nonAuthority); // Setup expected events + if (m_UseCmbService) + { + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() + { + SceneEvent = new SceneEvent() + { + SceneEventType = SceneEventType.SynchronizeComplete, + ClientId = expectedClientId, + }, + }); + } + m_ExpectedEventQueue.Enqueue(new ExpectedEvent() { ConnectionEvent = new ConnectionEventData() { EventType = ConnectionEvent.PeerConnected, - ClientId = m_ManagerToTest.LocalClientId + 1, + ClientId = expectedClientId, } }); From 9726cf1f7b1a93bf6d6618776aec66d7dcae6233 Mon Sep 17 00:00:00 2001 From: Emma Date: Thu, 29 May 2025 15:40:22 -0400 Subject: [PATCH 13/17] Add actual feature flag for this feature rather than piggybacking of the existing feature flag --- .../Runtime/Configuration/SessionConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs b/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs index aabc18dfc1..feba82d994 100644 --- a/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs +++ b/com.unity.netcode.gameobjects/Runtime/Configuration/SessionConfig.cs @@ -10,9 +10,10 @@ internal class SessionConfig public const uint ServerDistributionCompatible = 2; public const uint SessionStateToken = 3; public const uint NetworkBehaviourSerializationSafety = 4; + public const uint FixConnectionFlow = 5; // The most current session version (!!!!set this when you increment!!!!!) - public static uint PackageSessionVersion => NetworkBehaviourSerializationSafety; + public static uint PackageSessionVersion => FixConnectionFlow; internal uint SessionVersion; From 0cb041987bc7621fb60c77bfc7fdcaeecb1a10e8 Mon Sep 17 00:00:00 2001 From: Emma Date: Thu, 29 May 2025 15:46:20 -0400 Subject: [PATCH 14/17] Remove test changes --- .../Messages/ConnectionApprovedMessage.cs | 3 --- .../ExtendedNetworkShowAndHideTests.cs | 16 +++++----------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs index 517fb340f6..cb04a26d7e 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using Unity.Collections; -using UnityEngine; namespace Unity.Netcode { @@ -333,7 +332,6 @@ public void Handle(ref NetworkContext context) { NetworkLog.LogInfo($"[Client-{OwnerClientId}][Scene Management Disabled] Synchronization complete!"); } - // When scene management is disabled we notify after everything is synchronized networkManager.ConnectionManager.InvokeOnClientConnectedCallback(OwnerClientId); @@ -376,7 +374,6 @@ public void Handle(ref NetworkContext context) } } } - ConnectedClientIds.Dispose(); } } diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs index 22328e2a9b..bb77ddf926 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/ExtendedNetworkShowAndHideTests.cs @@ -6,18 +6,12 @@ namespace Unity.Netcode.RuntimeTests { - [TestFixture(HostOrServer.DAHost, Config.SceneManagementEnabled)] - [TestFixture(HostOrServer.DAHost, Config.SceneManagementDisabled)] + [TestFixture(HostOrServer.DAHost, true)] + [TestFixture(HostOrServer.DAHost, false)] public class ExtendedNetworkShowAndHideTests : NetcodeIntegrationTest { - public enum Config - { - SceneManagementEnabled, - SceneManagementDisabled, - } - protected override int NumberOfClients => 3; - private readonly bool m_EnableSceneManagement; + private bool m_EnableSceneManagement; private GameObject m_ObjectToSpawn; private NetworkObject m_SpawnedObject; private NetworkManager m_ClientToHideFrom; @@ -31,9 +25,9 @@ protected override bool UseCMBService() return false; } - public ExtendedNetworkShowAndHideTests(HostOrServer hostOrServer, Config enableSceneManagement) : base(hostOrServer) + public ExtendedNetworkShowAndHideTests(HostOrServer hostOrServer, bool enableSceneManagement) : base(hostOrServer) { - m_EnableSceneManagement = enableSceneManagement == Config.SceneManagementEnabled; + m_EnableSceneManagement = enableSceneManagement; } protected override void OnServerAndClientsCreated() From d0e540a419aa25e94427038561604e29e2a5c3d3 Mon Sep 17 00:00:00 2001 From: Emma Date: Fri, 30 May 2025 17:21:43 -0400 Subject: [PATCH 15/17] Fix Connection deferred queue --- .../Messages/ClientDisconnectedMessage.cs | 4 +++ .../Messages/ConnectionApprovedMessage.cs | 14 +++++--- .../SceneManagement/NetworkSceneManager.cs | 36 +++++++++++-------- 3 files changed, 35 insertions(+), 19 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientDisconnectedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientDisconnectedMessage.cs index 6cf0e413f0..7d374b321f 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientDisconnectedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ClientDisconnectedMessage.cs @@ -25,6 +25,10 @@ public bool Deserialize(FastBufferReader reader, ref NetworkContext context, int public void Handle(ref NetworkContext context) { var networkManager = (NetworkManager)context.SystemOwner; + if (networkManager.DistributedAuthorityMode && networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner && networkManager.NetworkConfig.EnableSceneManagement) + { + networkManager.SceneManager.ClientConnectionQueue.Remove(ClientId); + } // All modes support removing NetworkClients networkManager.ConnectionManager.RemoveClient(ClientId); networkManager.ConnectionManager.ConnectedClientIds.Remove(ClientId); diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs index cb04a26d7e..b455b8a7df 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs @@ -246,17 +246,23 @@ public bool Deserialize(FastBufferReader reader, ref NetworkContext context, int public void Handle(ref NetworkContext context) { var networkManager = (NetworkManager)context.SystemOwner; - if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) - { - NetworkLog.LogInfo($"[Client-{OwnerClientId}] Connection approved! Synchronizing..."); - } if (networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner && networkManager.NetworkConfig.EnableSceneManagement && networkManager.LocalClientId != OwnerClientId) { + if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) + { + NetworkLog.LogInfo($"[Session Owner] Received connection approved for Client-{OwnerClientId}! Synchronizing..."); + } + networkManager.SceneManager.SynchronizeNetworkObjects(OwnerClientId); return; } + if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) + { + NetworkLog.LogInfo($"[Client-{OwnerClientId}] Connection approved! Synchronizing..."); + } + networkManager.LocalClientId = OwnerClientId; networkManager.MessageManager.SetLocalClientId(networkManager.LocalClientId); networkManager.NetworkMetrics.SetConnectionId(networkManager.LocalClientId); diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index c9c0967b32..65860b7470 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -1925,6 +1925,10 @@ private void OnClientLoadedScene(uint sceneEventId, Scene scene) /// when many clients attempt to connect at the same time they will be /// handled sequentially so as to not saturate the session owner's maximum /// reliable messages. + /// DANGO-TODO: Get clients to track their synchronization status (if they haven't finished synchronizing) + /// - pending clients can listen to SessionOwnerChanged messages + /// - If the session owner changes, fire "some sort of event" to the service + /// - service can fire ConnectionApproved at new session owner /// internal List ClientConnectionQueue = new List(); @@ -2529,27 +2533,29 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) { // Remove the client that just synchronized ClientConnectionQueue.Remove(clientId); - - // If we have pending clients to synchronize, then make sure they are still connected - while (ClientConnectionQueue.Count > 0) - { - // If the next client is no longer connected then remove it from the list - if (!NetworkManager.ConnectedClientsIds.Contains(ClientConnectionQueue[0])) - { - ClientConnectionQueue.RemoveAt(0); - } - else - { - break; - } - } + // Debug.Log($"Remove client-{clientId} from synchronization queue."); + // + // // If we have pending clients to synchronize, then make sure they are still connected + // while (ClientConnectionQueue.Count > 0) + // { + // // If the next client is no longer connected then remove it from the list + // if (!NetworkManager.ConnectedClientsIds.Contains(ClientConnectionQueue[0])) + // { + // Debug.Log($"Remove client-{clientId} from synchronization queue as they are no longer connected."); + // ClientConnectionQueue.RemoveAt(0); + // } + // else + // { + // break; + // } + // } // If we still have any pending clients waiting, then synchronize the next one if (ClientConnectionQueue.Count > 0) { if (NetworkManager.LogLevel <= LogLevel.Developer) { - Debug.Log($"Synchronizing Client-{ClientConnectionQueue[0]}..."); + Debug.Log($"Synchronizing Deferred Client-{ClientConnectionQueue[0]}..."); } SynchronizeNetworkObjects(ClientConnectionQueue[0]); } From 68288b7fdf36f2653874b864a06c810760c23017 Mon Sep 17 00:00:00 2001 From: Emma Date: Fri, 30 May 2025 17:33:53 -0400 Subject: [PATCH 16/17] Log warning on duplicate connection approved --- .../Messages/ConnectionApprovedMessage.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs index b455b8a7df..02c63bfd34 100644 --- a/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs +++ b/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/ConnectionApprovedMessage.cs @@ -247,14 +247,21 @@ public void Handle(ref NetworkContext context) { var networkManager = (NetworkManager)context.SystemOwner; - if (networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner && networkManager.NetworkConfig.EnableSceneManagement && networkManager.LocalClientId != OwnerClientId) + if (networkManager.CMBServiceConnection && networkManager.LocalClient.IsSessionOwner && networkManager.NetworkConfig.EnableSceneManagement) { - if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) + if (networkManager.LocalClientId != OwnerClientId) { - NetworkLog.LogInfo($"[Session Owner] Received connection approved for Client-{OwnerClientId}! Synchronizing..."); - } + if (NetworkLog.CurrentLogLevel <= LogLevel.Developer) + { + NetworkLog.LogInfo($"[Session Owner] Received connection approved for Client-{OwnerClientId}! Synchronizing..."); + } - networkManager.SceneManager.SynchronizeNetworkObjects(OwnerClientId); + networkManager.SceneManager.SynchronizeNetworkObjects(OwnerClientId); + } + else + { + NetworkLog.LogWarning($"[Client-{OwnerClientId}] Receiving duplicate connection approved. Client is already connected!"); + } return; } From faa197ee5ccf5fddc5925d3b8ace2eff80168921 Mon Sep 17 00:00:00 2001 From: Emma Date: Mon, 2 Jun 2025 10:59:19 -0400 Subject: [PATCH 17/17] Remove commented out code and add entry to changelog --- com.unity.netcode.gameobjects/CHANGELOG.md | 1 + .../SceneManagement/NetworkSceneManager.cs | 18 +----------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 01a351dce1..f0f4519d57 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -14,6 +14,7 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Fixed +- Fixed issue with the Distributed Authority connection sequence with scene management enabled where the `ClientConnected` event was fired before the client was synchronized. (#3459) - Fixed issue where `NetworkVariable`s on a `NetworkBehaviour` could fail to synchronize changes if one has `NetworkVariableUpdateTraits` set and is dirty but is not ready to send. (#3466) - Fixed inconsistencies in the `OnSceneEvent` callback. (#3458) - Fixed issues with the `NetworkBehaviour` and `NetworkVariable` length safety checks. (#3405) diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index 65860b7470..275d7961bf 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -2533,29 +2533,13 @@ private void HandleSessionOwnerEvent(uint sceneEventId, ulong clientId) { // Remove the client that just synchronized ClientConnectionQueue.Remove(clientId); - // Debug.Log($"Remove client-{clientId} from synchronization queue."); - // - // // If we have pending clients to synchronize, then make sure they are still connected - // while (ClientConnectionQueue.Count > 0) - // { - // // If the next client is no longer connected then remove it from the list - // if (!NetworkManager.ConnectedClientsIds.Contains(ClientConnectionQueue[0])) - // { - // Debug.Log($"Remove client-{clientId} from synchronization queue as they are no longer connected."); - // ClientConnectionQueue.RemoveAt(0); - // } - // else - // { - // break; - // } - // } // If we still have any pending clients waiting, then synchronize the next one if (ClientConnectionQueue.Count > 0) { if (NetworkManager.LogLevel <= LogLevel.Developer) { - Debug.Log($"Synchronizing Deferred Client-{ClientConnectionQueue[0]}..."); + Debug.Log($"Synchronizing deferred Client-{ClientConnectionQueue[0]}..."); } SynchronizeNetworkObjects(ClientConnectionQueue[0]); }