Skip to content

Commit 091b502

Browse files
style
Removing commented out code that is no longer needed/used.
1 parent b7f0769 commit 091b502

3 files changed

Lines changed: 1 addition & 47 deletions

File tree

com.unity.netcode.gameobjects/Tests/Runtime/Components/NetworkVariableTestComponent.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,6 @@ public bool IsTestComplete()
356356
return m_FinishedTests;
357357
}
358358

359-
public void Awake()
360-
{
361-
//InitializeTest();
362-
}
363-
364359
public void AssertAllValuesAreCorrect()
365360
{
366361
Assert.AreEqual(false, m_NetworkVariableBool.Value);

com.unity.netcode.gameobjects/Tests/Runtime/NetworkManagerPlayerPrefab.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,6 @@ internal override bool ShouldCreatePlayerPrefab()
2525
return false;
2626
}
2727

28-
///// <summary>
29-
///// Assure no player prefab is assigned.
30-
///// </summary>
31-
//protected override void OnServerAndClientsCreated()
32-
//{
33-
// foreach (var networkManager in m_NetworkManagers)
34-
// {
35-
// networkManager.NetworkConfig.Prefabs.Remove(m_PlayerPrefab);
36-
// networkManager.NetworkConfig.PlayerPrefab = null;
37-
// }
38-
// base.OnServerAndClientsCreated();
39-
//}
40-
41-
//protected override void OnNewClientCreated(NetworkManager networkManager)
42-
//{
43-
// networkManager.NetworkConfig.PlayerPrefab = null;
44-
// base.OnNewClientCreated(networkManager);
45-
//}
46-
4728
/// <summary>
4829
/// Do not wait for spawned players as there are none.
4930
/// </summary>

com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTests.cs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -368,20 +368,6 @@ public void AllNetworkVariableTypes([Values] HostOrServer useHost)
368368
StopOneClientWithTimeTravel(networkManager);
369369
}
370370

371-
// Create, instantiate, and host
372-
// This would normally go in Setup, but since every other test but this one
373-
// uses NetworkManagerHelper, and it does its own NetworkManager setup / teardown,
374-
// for now we put this within this one test until we migrate it to MIH
375-
//Assert.IsTrue(NetworkManagerHelper.StartNetworkManager(out NetworkManager server, useHost == HostOrServer.Host ? NetworkManagerHelper.NetworkManagerOperatingMode.Host : NetworkManagerHelper.NetworkManagerOperatingMode.Server));
376-
377-
//Assert.IsTrue(server.IsHost == (useHost == HostOrServer.Host), $"{nameof(useHost)} does not match the server.IsHost value!");
378-
379-
//Guid gameObjectId = NetworkManagerHelper.AddGameNetworkObject("NetworkVariableTestComponent");
380-
381-
//var networkVariableTestComponent = NetworkManagerHelper.AddComponentToObject<NetworkVariableTestComponent>(gameObjectId);
382-
383-
//NetworkManagerHelper.SpawnNetworkObject(gameObjectId);
384-
385371
var instance = SpawnObject(prefabToSpawn, authority);
386372
var networkVariableTestComponent = instance.GetComponent<NetworkVariableTestComponent>();
387373

@@ -400,16 +386,8 @@ public void AllNetworkVariableTypes([Values] HostOrServer useHost)
400386
Assert.IsTrue(networkVariableTestComponent.DidAllValuesChange());
401387
networkVariableTestComponent.AssertAllValuesAreCorrect();
402388

403-
// Disable this once we are done.
404-
405-
406-
407-
408-
// This would normally go in Teardown, but since every other test but this one
409-
// uses NetworkManagerHelper, and it does its own NetworkManager setup / teardown,
410-
// for now we put this within this one test until we migrate it to MIH
389+
// Stop the authority NetworkManager instance
411390
StopOneClientWithTimeTravel(authority);
412-
//NetworkManagerHelper.ShutdownNetworkManager();
413391
}
414392

415393
[Test]

0 commit comments

Comments
 (0)