This commit is contained in:
vis2k 2021-03-10 21:08:40 +08:00
parent be2369f4a1
commit 956bfff3ad

View File

@ -1,5 +1,4 @@
using System.Collections;
using System.Reflection;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
@ -12,9 +11,7 @@ public class ClientSceneTests_LocalPlayer : ClientSceneTestsBase
public void Setup()
{
Debug.Assert(NetworkClient.localPlayer == null, "LocalPlayer should be null before this test");
PropertyInfo readyConnProperty = typeof(ClientScene).GetProperty(nameof(NetworkClient.readyConnection));
readyConnProperty.SetValue(null, new FakeNetworkConnection());
NetworkClient.readyConnection = new FakeNetworkConnection();
}
NetworkIdentity SpawnObject(bool localPlayer)