Tests: SpawnObject reuses CreateNetworked

This commit is contained in:
vis2k 2021-05-20 15:29:08 +08:00
parent c8193c2100
commit 63023c1f27

View File

@ -15,14 +15,12 @@ public override void SetUp()
NetworkClient.connection = new FakeNetworkConnection();
}
// TODO reuse MirrorTest.CreateNetworkedAndSpawn?
NetworkIdentity SpawnObject(bool localPlayer)
{
const uint netId = 1000;
GameObject go = new GameObject();
_createdObjects.Add(go);
NetworkIdentity identity = go.AddComponent<NetworkIdentity>();
CreateNetworked(out GameObject go, out NetworkIdentity identity);
SpawnMessage msg = new SpawnMessage
{