mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
ClientSceneTests: reuse CreateNetworked
This commit is contained in:
parent
0a28072f26
commit
77e8f1d7e4
@ -70,9 +70,8 @@ public override void TearDown()
|
||||
[Test]
|
||||
public void FindOrSpawnObject_FindExistingObject()
|
||||
{
|
||||
CreateNetworked(out GameObject go, out NetworkIdentity existing);
|
||||
const uint netId = 1000;
|
||||
GameObject go = new GameObject();
|
||||
NetworkIdentity existing = go.AddComponent<NetworkIdentity>();
|
||||
existing.netId = netId;
|
||||
spawned.Add(netId, existing);
|
||||
|
||||
@ -84,10 +83,6 @@ public void FindOrSpawnObject_FindExistingObject()
|
||||
|
||||
Assert.IsTrue(success);
|
||||
Assert.That(found, Is.EqualTo(existing));
|
||||
|
||||
|
||||
// cleanup
|
||||
GameObject.DestroyImmediate(found.gameObject);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -700,7 +695,6 @@ public void OnSpawn_SpawnsAndAppliesPayload()
|
||||
const int netId = 1;
|
||||
Debug.Assert(spawned.Count == 0, "There should be no spawned objects before test");
|
||||
|
||||
|
||||
Vector3 position = new Vector3(30, 20, 10);
|
||||
Quaternion rotation = Quaternion.Euler(0, 0, 90);
|
||||
SpawnMessage msg = new SpawnMessage
|
||||
|
Loading…
Reference in New Issue
Block a user