From 63023c1f27daf6ab92ae6cad9f620d17e6f50814 Mon Sep 17 00:00:00 2001 From: vis2k Date: Thu, 20 May 2021 15:29:08 +0800 Subject: [PATCH] Tests: SpawnObject reuses CreateNetworked --- Assets/Mirror/Tests/Runtime/ClientSceneTests_LocalPlayer.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Assets/Mirror/Tests/Runtime/ClientSceneTests_LocalPlayer.cs b/Assets/Mirror/Tests/Runtime/ClientSceneTests_LocalPlayer.cs index 6a3943715..ec0366e7f 100644 --- a/Assets/Mirror/Tests/Runtime/ClientSceneTests_LocalPlayer.cs +++ b/Assets/Mirror/Tests/Runtime/ClientSceneTests_LocalPlayer.cs @@ -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(); + CreateNetworked(out GameObject go, out NetworkIdentity identity); SpawnMessage msg = new SpawnMessage {