public void OnDestroy() { if (webSocket != null) { Debug.Log("WebSocket Disconnect"); webSocket.Close(); } StopAllCoroutines(); }