public void OnDestroy() { try { client.CloseConnection(); } catch (Exception e) { Debug.Log(e.ToString()); } }