private void OnNetworkEvent(object sender, ENetNetworkEvent @event) { if (@event.Event.Type == EventType.Disconnect || @event.Event.Type == EventType.Timeout) { m_EntityManager.DespawnEntities(@event.NetworkPeer); } }