Exemplo n.º 1
0
        public IEnumerator LocalPlayerIsSetToNullAfterDestroyMessage()
        {
            NetworkIdentity player = SpawnObject(true);

            ClientScene.OnObjectDestroy(new ObjectDestroyMessage
            {
                netId = player.netId
            });

            // wait a frame for destroy to happen
            yield return(null);

            // use "is null" here to avoid unity == check
            Assert.IsTrue(ClientScene.localPlayer is null, "local player should be set to c# null");
        }