private void OnApplicationQuit() { if (netController && netController.IsConnected()) { Disconnect(); } }