diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 8c4bb1122e..9f2f95e72e 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -15,6 +15,8 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Fixed +- Fixed in-scene `NertworkObject` synchronization issue when loading a scene with currently connected clients connected to a session created by a `NetworkManager` started as a server (i.e. not as a host). (#3133) +- Fixed issue where a `NetworkManager` started as a server would not add itself as an observer to in-scene placed `NetworkObject`s instantiated and spawned by a scene loading event. (#3133) - Fixed issue where spawning a player using `NetworkObject.InstantiateAndSpawn` or `NetworkSpawnManager.InstantiateAndSpawn` would not update the `NetworkSpawnManager.PlayerObjects` or assign the newly spawned player to the `NetworkClient.PlayerObject`. (#3122) - Fixed issue where queued UnitTransport (NetworkTransport) message batches were being sent on the next frame. They are now sent at the end of the frame during `PostLateUpdate`. (#3113) - Fixed issue where `NotOwnerRpcTarget` or `OwnerRpcTarget` were not using their replacements `NotAuthorityRpcTarget` and `AuthorityRpcTarget` which would invoke a warning. (#3111) diff --git a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs index 65222007bf..acffc411f8 100644 --- a/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs @@ -1081,14 +1081,19 @@ private void SendSceneEventData(uint sceneEventId, ulong[] targetClientIds) } else { - var message = new SceneEventMessage + // Send to each individual client to assure only the in-scene placed NetworkObjects being observed by the client + // is serialized + foreach (var clientId in targetClientIds) { - EventData = sceneEvent, - }; - var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, targetClientIds); - NetworkManager.NetworkMetrics.TrackSceneEventSent(targetClientIds, (uint)SceneEventDataStore[sceneEventId].SceneEventType, SceneNameFromHash(SceneEventDataStore[sceneEventId].SceneHash), size); + sceneEvent.TargetClientId = clientId; + var message = new SceneEventMessage + { + EventData = sceneEvent, + }; + var size = NetworkManager.ConnectionManager.SendMessage(ref message, k_DeliveryType, clientId); + NetworkManager.NetworkMetrics.TrackSceneEventSent(clientId, (uint)sceneEvent.SceneEventType, SceneNameFromHash(sceneEvent.SceneHash), size); + } } - } /// diff --git a/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs b/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs index 910b1b55e1..8bc3517bae 100644 --- a/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs @@ -1119,6 +1119,12 @@ private void SpawnNetworkObjectLocallyCommon(NetworkObject networkObject, ulong // then add all connected clients as observers if (!NetworkManager.DistributedAuthorityMode && NetworkManager.IsServer && networkObject.SpawnWithObservers) { + // If running as a server only, then make sure to always add the server's client identifier + if (!NetworkManager.IsHost) + { + networkObject.Observers.Add(NetworkManager.LocalClientId); + } + // Add client observers for (int i = 0; i < NetworkManager.ConnectedClientsIds.Count; i++) { diff --git a/com.unity.netcode.gameobjects/TestHelpers/Runtime/IntegrationTestWithApproximation.cs b/com.unity.netcode.gameobjects/TestHelpers/Runtime/IntegrationTestWithApproximation.cs index 02a5393217..89b1e89e53 100644 --- a/com.unity.netcode.gameobjects/TestHelpers/Runtime/IntegrationTestWithApproximation.cs +++ b/com.unity.netcode.gameobjects/TestHelpers/Runtime/IntegrationTestWithApproximation.cs @@ -87,6 +87,8 @@ protected Vector3 GetRandomVector3(float min, float max) return new Vector3(Random.Range(min, max), Random.Range(min, max), Random.Range(min, max)); } + public IntegrationTestWithApproximation(NetworkTopologyTypes networkTopologyType, HostOrServer hostOrServer) : base(networkTopologyType, hostOrServer) { } + public IntegrationTestWithApproximation(NetworkTopologyTypes networkTopologyType) : base(networkTopologyType) { } public IntegrationTestWithApproximation(HostOrServer hostOrServer) : base(hostOrServer) { } diff --git a/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs b/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs index a84a7ccb7c..921d70b928 100644 --- a/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs +++ b/com.unity.netcode.gameobjects/TestHelpers/Runtime/NetcodeIntegrationTest.cs @@ -1759,6 +1759,13 @@ public NetcodeIntegrationTest(NetworkTopologyTypes networkTopologyType) m_DistributedAuthority = m_NetworkTopologyType == NetworkTopologyTypes.DistributedAuthority; } + public NetcodeIntegrationTest(NetworkTopologyTypes networkTopologyType, HostOrServer hostOrServer) + { + m_NetworkTopologyType = networkTopologyType; + m_DistributedAuthority = m_NetworkTopologyType == NetworkTopologyTypes.DistributedAuthority; + m_UseHost = hostOrServer == HostOrServer.Host || hostOrServer == HostOrServer.DAHost; + } + /// /// Optional Host or Server integration tests /// Constructor that allows you To break tests up as a host diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/ClientSynchronizationValidationTest.cs b/testproject/Assets/Tests/Runtime/NetworkSceneManager/ClientSynchronizationValidationTest.cs index 31f54ce5de..99781be873 100644 --- a/testproject/Assets/Tests/Runtime/NetworkSceneManager/ClientSynchronizationValidationTest.cs +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/ClientSynchronizationValidationTest.cs @@ -9,8 +9,9 @@ namespace TestProject.RuntimeTests { - [TestFixture(NetworkTopologyTypes.DistributedAuthority)] - [TestFixture(NetworkTopologyTypes.ClientServer)] + [TestFixture(NetworkTopologyTypes.DistributedAuthority, HostOrServer.DAHost)] + [TestFixture(NetworkTopologyTypes.ClientServer, HostOrServer.Host)] + [TestFixture(NetworkTopologyTypes.ClientServer, HostOrServer.Server)] public class ClientSynchronizationValidationTest : NetcodeIntegrationTest { protected override int NumberOfClients => 0; @@ -22,7 +23,7 @@ public class ClientSynchronizationValidationTest : NetcodeIntegrationTest private bool m_RuntimeSceneWasExcludedFromSynch; private List m_ClientSceneVerifiers = new List(); - public ClientSynchronizationValidationTest(NetworkTopologyTypes networkTopologyType) : base(networkTopologyType) { } + public ClientSynchronizationValidationTest(NetworkTopologyTypes networkTopologyType, HostOrServer hostOrServer) : base(networkTopologyType, hostOrServer) { } protected override void OnNewClientStarted(NetworkManager networkManager) { @@ -78,11 +79,17 @@ public IEnumerator ClientSynchWithServerSideRuntimeGeneratedScene() /// Validates that connecting clients will exclude scenes using /// [UnityTest] - public IEnumerator ClientVerifySceneBeforeLoading() + public IEnumerator ClientVerifySceneBeforeLoading([Values] bool startClientBefore) { m_IncludeSceneVerificationHandler = true; var scenesToLoad = new List() { k_FirstSceneToLoad, k_SecondSceneToLoad, k_ThirdSceneToSkip }; m_ServerNetworkManager.SceneManager.OnLoadComplete += OnLoadComplete; + + if (startClientBefore) + { + yield return CreateAndStartNewClient(); + } + foreach (var sceneToLoad in scenesToLoad) { m_SceneBeingLoadedIsLoaded = false; @@ -91,9 +98,25 @@ public IEnumerator ClientVerifySceneBeforeLoading() yield return WaitForConditionOrTimeOut(() => m_SceneBeingLoadedIsLoaded); AssertOnTimeout($"Timed out waiting for scene {m_SceneBeingLoaded} to finish loading!"); + + var serverId = m_ServerNetworkManager.LocalClientId; + var serverOrHost = m_ServerNetworkManager.IsHost ? "Host" : "Server"; + foreach (var spawnedObjectEntry in m_ServerNetworkManager.SpawnManager.SpawnedObjects) + { + var networkObject = spawnedObjectEntry.Value; + if (!networkObject.IsSceneObject.Value) + { + continue; + } + + Assert.True(networkObject.Observers.Contains(serverId), $"The {serverOrHost} is not an observer of in-scene placed {nameof(NetworkObject)} {networkObject.name}!"); + } } - yield return CreateAndStartNewClient(); + if (!startClientBefore) + { + yield return CreateAndStartNewClient(); + } yield return WaitForConditionOrTimeOut(m_ClientSceneVerifiers[0].HasLoadedExpectedScenes); AssertOnTimeout($"Timed out waiting for the client to have loaded the expected scenes"); @@ -104,6 +127,18 @@ public IEnumerator ClientVerifySceneBeforeLoading() { clientSceneVerifier.ValidateScenesLoaded(); } + + // Finally, validate that all in-scene placed NetworkObjects were properly synchronized/spawned on the client side + foreach (var spawnedObjectEntry in m_ServerNetworkManager.SpawnManager.SpawnedObjects) + { + var networkObject = spawnedObjectEntry.Value; + if (!networkObject.IsSceneObject.Value) + { + continue; + } + Assert.True(m_ClientNetworkManagers[0].SpawnManager.SpawnedObjects.ContainsKey(networkObject.NetworkObjectId), $"{nameof(NetworkObject)}-{networkObject.NetworkObjectId} " + + $"did not synchronize on Client-{m_ClientNetworkManagers[0].LocalClientId}!"); + } } private string m_SceneBeingLoaded; diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/InScenePlacedNetworkObjectTests.cs b/testproject/Assets/Tests/Runtime/NetworkSceneManager/InScenePlacedNetworkObjectTests.cs index 446daea85a..59922c5959 100644 --- a/testproject/Assets/Tests/Runtime/NetworkSceneManager/InScenePlacedNetworkObjectTests.cs +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/InScenePlacedNetworkObjectTests.cs @@ -13,11 +13,12 @@ namespace TestProject.RuntimeTests { - [TestFixture(NetworkTopologyTypes.DistributedAuthority)] - [TestFixture(NetworkTopologyTypes.ClientServer)] + [TestFixture(NetworkTopologyTypes.DistributedAuthority, HostOrServer.DAHost)] + [TestFixture(NetworkTopologyTypes.ClientServer, HostOrServer.Host)] + [TestFixture(NetworkTopologyTypes.ClientServer, HostOrServer.Server)] public class InScenePlacedNetworkObjectTests : IntegrationTestWithApproximation { - protected override int NumberOfClients => 2; + protected override int NumberOfClients => 3; private const string k_SceneToLoad = "InSceneNetworkObject"; private const string k_InSceneUnder = "InSceneUnderGameObject"; @@ -26,7 +27,7 @@ public class InScenePlacedNetworkObjectTests : IntegrationTestWithApproximation private bool m_CanStartServerAndClients; private string m_SceneLoading = k_SceneToLoad; - public InScenePlacedNetworkObjectTests(NetworkTopologyTypes networkTopologyType) : base(networkTopologyType) { } + public InScenePlacedNetworkObjectTests(NetworkTopologyTypes networkTopologyType, HostOrServer hostOrServer) : base(networkTopologyType, hostOrServer) { } protected override IEnumerator OnSetup() { @@ -62,6 +63,7 @@ protected override bool CanStartServerAndClients() [UnityTest] public IEnumerator InSceneNetworkObjectSynchAndSpawn() { + NetworkObjectTestComponent.VerboseDebug = true; // Because despawning a client will cause it to shutdown and clean everything in the // scene hierarchy, we have to prevent one of the clients from spawning initially before // we test synchronizing late joining clients with despawned in-scene placed NetworkObjects. @@ -69,23 +71,25 @@ public IEnumerator InSceneNetworkObjectSynchAndSpawn() // will be targeting to join late from the m_ClientNetworkManagers array, start the server // and the remaining client, despawn the in-scene NetworkObject, and then start and synchronize // the clientToTest. - var clientToTest = m_ClientNetworkManagers[1]; + var clientToTest = m_ClientNetworkManagers[2]; var clients = m_ClientNetworkManagers.ToList(); clients.Remove(clientToTest); m_ClientNetworkManagers = clients.ToArray(); m_CanStartServerAndClients = true; + NetworkObjectTestComponent.Reset(); yield return StartServerAndClients(); clients.Add(clientToTest); m_ClientNetworkManagers = clients.ToArray(); - NetworkObjectTestComponent.ServerNetworkObjectInstance = null; + m_ServerNetworkManager.SceneManager.OnSceneEvent += Server_OnSceneEvent; var status = m_ServerNetworkManager.SceneManager.LoadScene(k_SceneToLoad, LoadSceneMode.Additive); Assert.IsTrue(status == SceneEventProgressStatus.Started, $"When attempting to load scene {k_SceneToLoad} was returned the following progress status: {status}"); - + // We removed a client from the initial spawn and server should spawn too + var clientCount = TotalClients - (m_UseHost ? 1 : 0); // This verifies the scene loaded and the in-scene placed NetworkObjects spawned. - yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == TotalClients - 1); - AssertOnTimeout($"Timed out waiting for total spawned in-scene placed NetworkObjects to reach a count of {TotalClients - 1} and is currently {NetworkObjectTestComponent.SpawnedInstances.Count}"); + yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == clientCount); + AssertOnTimeout($"Timed out waiting for total spawned in-scene placed NetworkObjects to reach a count of {clientCount} and is currently {NetworkObjectTestComponent.SpawnedInstances.Count}"); // Get the server-side instance of the in-scene NetworkObject Assert.True(s_GlobalNetworkObjects.ContainsKey(m_ServerNetworkManager.LocalClientId), $"Could not find server instance of the test in-scene NetworkObject!"); @@ -102,6 +106,9 @@ public IEnumerator InSceneNetworkObjectSynchAndSpawn() // Now late join a client NetworkObjectTestComponent.OnInSceneObjectDespawned += OnInSceneObjectDespawned; NetcodeIntegrationTestHelpers.StartOneClient(clientToTest); + // Spawned another client + clientCount++; + yield return WaitForConditionOrTimeOut(() => (clientToTest.IsConnectedClient && clientToTest.IsListening)); AssertOnTimeout($"Timed out waiting for {clientToTest.name} to reconnect!"); @@ -120,21 +127,24 @@ public IEnumerator InSceneNetworkObjectSynchAndSpawn() // Now test that the despawned in-scene placed NetworkObject can be re-spawned (without having been registered as a NetworkPrefab) serverObject.Spawn(); - yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == TotalClients); - AssertOnTimeout($"Timed out waiting for all in-scene instances to be spawned! Current spawned count: {NetworkObjectTestComponent.SpawnedInstances.Count()} | Expected spawn count: {TotalClients}"); + yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == clientCount); + AssertOnTimeout($"Timed out waiting for all in-scene instances to be spawned! Current spawned count: {NetworkObjectTestComponent.SpawnedInstances.Count()} | Expected spawn count: {clientCount}"); // Test NetworkHide on the first client var firstClientId = m_ClientNetworkManagers[0].LocalClientId; serverObject.NetworkHide(firstClientId); + clientCount--; - yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == TotalClients - 1); - AssertOnTimeout($"[NetworkHide] Timed out waiting for Client-{firstClientId} to despawn the in-scene placed NetworkObject! Current spawned count: {NetworkObjectTestComponent.SpawnedInstances.Count()} | Expected spawn count: {TotalClients - 1}"); + yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == clientCount); + AssertOnTimeout($"[NetworkHide] Timed out waiting for Client-{firstClientId} to despawn the in-scene placed NetworkObject! Current spawned count: {NetworkObjectTestComponent.SpawnedInstances.Count()} | Expected spawn count: {clientCount}"); // Validate that the first client can spawn the "netcode hidden" in-scene placed NetworkObject serverObject.NetworkShow(firstClientId); - yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == TotalClients); - AssertOnTimeout($"[NetworkShow] Timed out waiting for Client-{firstClientId} to spawn the in-scene placed NetworkObject! Current spawned count: {NetworkObjectTestComponent.SpawnedInstances.Count()} | Expected spawn count: {TotalClients}"); + clientCount++; + + yield return WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == clientCount); + AssertOnTimeout($"[NetworkShow] Timed out waiting for Client-{firstClientId} to spawn the in-scene placed NetworkObject! Current spawned count: {NetworkObjectTestComponent.SpawnedInstances.Count()} | Expected spawn count: {clientCount}"); CleanUpLoadedScene(); } @@ -151,7 +161,7 @@ public IEnumerator ParentedInSceneObjectLateJoiningClient() // will be targeting to join late from the m_ClientNetworkManagers array, start the server // and the remaining client, despawn the in-scene NetworkObject, and then start and synchronize // the clientToTest. - var clientToTest = m_ClientNetworkManagers[1]; + var clientToTest = m_ClientNetworkManagers[2]; var clients = m_ClientNetworkManagers.ToList(); clients.Remove(clientToTest); m_ClientNetworkManagers = clients.ToArray(); @@ -173,12 +183,22 @@ public IEnumerator ParentedInSceneObjectLateJoiningClient() Assert.IsNotNull(firstClientInSceneObjectInstance, $"Could not get the client-side registration of {nameof(NetworkObjectTestComponent)}!"); Assert.IsTrue(firstClientInSceneObjectInstance.NetworkManager == m_ClientNetworkManagers[0]); - // Parent the object - serverInSceneObjectInstance.transform.parent = m_ServerNetworkManager.LocalClient.PlayerObject.transform; + var playerObjectToParent = m_UseHost ? m_ServerNetworkManager.LocalClient.PlayerObject : m_PlayerNetworkObjects[m_ServerNetworkManager.LocalClientId][m_ClientNetworkManagers[1].LocalClientId]; + var clientSidePlayer = (NetworkObject)null; + if (!m_UseHost) + { + playerObjectToParent = m_PlayerNetworkObjects[m_ServerNetworkManager.LocalClientId][m_ClientNetworkManagers[1].LocalClientId]; + clientSidePlayer = m_PlayerNetworkObjects[m_ClientNetworkManagers[0].LocalClientId][m_ClientNetworkManagers[1].LocalClientId]; + } + else + { + clientSidePlayer = m_PlayerNetworkObjects[m_ClientNetworkManagers[0].LocalClientId][NetworkManager.ServerClientId]; + } - var clientSideServerPlayer = m_PlayerNetworkObjects[m_ClientNetworkManagers[0].LocalClientId][NetworkManager.ServerClientId]; + // Parent the object + serverInSceneObjectInstance.transform.parent = playerObjectToParent.transform; - yield return WaitForConditionOrTimeOut(() => firstClientInSceneObjectInstance.transform.parent != null && firstClientInSceneObjectInstance.transform.parent == clientSideServerPlayer.transform); + yield return WaitForConditionOrTimeOut(() => firstClientInSceneObjectInstance.transform.parent != null && firstClientInSceneObjectInstance.transform.parent == clientSidePlayer.transform); AssertOnTimeout($"Timed out waiting for the client-side id ({m_ClientNetworkManagers[0].LocalClientId}) server player transform to be set on the client-side in-scene object!"); // Now late join a client NetcodeIntegrationTestHelpers.StartOneClient(clientToTest); @@ -190,15 +210,15 @@ public IEnumerator ParentedInSceneObjectLateJoiningClient() // Update the newly joined client information ClientNetworkManagerPostStartInit(); - var lateJoinClientInSceneObjectInstance = NetworkObjectTestComponent.SpawnedInstances.Where((c) => c.NetworkManager == m_ClientNetworkManagers[1]).FirstOrDefault(); + var lateJoinClientInSceneObjectInstance = NetworkObjectTestComponent.SpawnedInstances.Where((c) => c.NetworkManager == m_ClientNetworkManagers[2]).FirstOrDefault(); Assert.IsNotNull(lateJoinClientInSceneObjectInstance, $"Could not get the client-side registration of {nameof(NetworkObjectTestComponent)} for the late joining client!"); // Now get the late-joining client's instance for the server player - clientSideServerPlayer = m_PlayerNetworkObjects[clientToTest.LocalClientId][NetworkManager.ServerClientId]; + clientSidePlayer = m_PlayerNetworkObjects[clientToTest.LocalClientId][clientSidePlayer.OwnerClientId]; // Validate the late joined client's in-scene NetworkObject is parented to the server-side player - yield return WaitForConditionOrTimeOut(() => lateJoinClientInSceneObjectInstance.transform.parent != null && lateJoinClientInSceneObjectInstance.transform.parent == clientSideServerPlayer.transform); - AssertOnTimeout($"Timed out waiting for the client-side id ({m_ClientNetworkManagers[0].LocalClientId}) server player transform to be set on the client-side in-scene object!"); + yield return WaitForConditionOrTimeOut(() => lateJoinClientInSceneObjectInstance.transform.parent != null && lateJoinClientInSceneObjectInstance.transform.parent == clientSidePlayer.transform); + AssertOnTimeout($"Timed out waiting for the client-side id ({m_ClientNetworkManagers[0].LocalClientId}) player transform to be set on the client-side in-scene object!"); } private void OnSceneEvent(SceneEvent sceneEvent) @@ -484,9 +504,6 @@ public IEnumerator ParentedInSceneObjectUnderGameObject([Values(k_InSceneUnder, Assert.IsNotNull(firstClientInSceneObjectInstance, $"Could not get the client-side registration of {nameof(NetworkObjectTestComponent)}!"); Assert.IsTrue(firstClientInSceneObjectInstance.NetworkManager == m_ClientNetworkManagers[0]); - // Parent the object - var clientSideServerPlayer = m_PlayerNetworkObjects[m_ClientNetworkManagers[0].LocalClientId][NetworkManager.ServerClientId]; - serverInSceneObjectInstance.AutoObjectParentSync = parentSyncSettings == ParentSyncSettings.ParentSync; serverInSceneObjectInstance.SynchronizeTransform = transformSyncSettings == TransformSyncSettings.TransformSync; diff --git a/testproject/Assets/Tests/Runtime/NetworkSceneManager/NetworkSceneManagerPopulateInSceneTests.cs b/testproject/Assets/Tests/Runtime/NetworkSceneManager/NetworkSceneManagerPopulateInSceneTests.cs index 7f344584ea..4af8737c44 100644 --- a/testproject/Assets/Tests/Runtime/NetworkSceneManager/NetworkSceneManagerPopulateInSceneTests.cs +++ b/testproject/Assets/Tests/Runtime/NetworkSceneManager/NetworkSceneManagerPopulateInSceneTests.cs @@ -11,8 +11,9 @@ namespace TestProject.RuntimeTests { - [TestFixture(NetworkTopologyTypes.DistributedAuthority)] - [TestFixture(NetworkTopologyTypes.ClientServer)] + [TestFixture(NetworkTopologyTypes.DistributedAuthority, HostOrServer.DAHost)] + [TestFixture(NetworkTopologyTypes.ClientServer, HostOrServer.Host)] + [TestFixture(NetworkTopologyTypes.ClientServer, HostOrServer.Server)] public class NetworkSceneManagerPopulateInSceneTests : NetcodeIntegrationTest { protected override int NumberOfClients => 0; @@ -20,7 +21,7 @@ public class NetworkSceneManagerPopulateInSceneTests : NetcodeIntegrationTest protected Dictionary m_InSceneObjectList = new Dictionary(); - public NetworkSceneManagerPopulateInSceneTests(NetworkTopologyTypes networkTopologyType) : base(networkTopologyType) { } + public NetworkSceneManagerPopulateInSceneTests(NetworkTopologyTypes networkTopologyType, HostOrServer hostOrServer) : base(networkTopologyType, hostOrServer) { } protected override IEnumerator OnSetup() {