private static void OnObjectSpawnFinished(NetworkMessage netMsg) { netMsg.ReadMessage <ObjectSpawnFinishedMessage>(ClientScene.s_ObjectSpawnFinishedMessage); if (LogFilter.logDebug) { Debug.Log((object)("SpawnFinished:" + (object)ClientScene.s_ObjectSpawnFinishedMessage.state)); } if ((int)ClientScene.s_ObjectSpawnFinishedMessage.state == 0) { ClientScene.PrepareToSpawnSceneObjects(); ClientScene.s_IsSpawnFinished = false; } else { using (Dictionary <NetworkInstanceId, NetworkIdentity> .ValueCollection.Enumerator enumerator = ClientScene.objects.Values.GetEnumerator()) { while (enumerator.MoveNext()) { NetworkIdentity current = enumerator.Current; if (!current.isClient) { current.OnStartClient(); ClientScene.CheckForOwner(current); } } } ClientScene.s_IsSpawnFinished = true; } }
private static void OnObjectSpawnFinished(NetworkMessage netMsg) { netMsg.ReadMessage <ObjectSpawnFinishedMessage>(ClientScene.s_ObjectSpawnFinishedMessage); if (LogFilter.logDebug) { Debug.Log("SpawnFinished:" + ClientScene.s_ObjectSpawnFinishedMessage.state); } if (ClientScene.s_ObjectSpawnFinishedMessage.state == 0u) { ClientScene.PrepareToSpawnSceneObjects(); ClientScene.s_IsSpawnFinished = false; } else { foreach (NetworkIdentity networkIdentity in ClientScene.objects.Values) { if (!networkIdentity.isClient) { networkIdentity.OnStartClient(); ClientScene.CheckForOwner(networkIdentity); } } ClientScene.s_IsSpawnFinished = true; } }