public void OnDestroy() { Debug.Log("WebSockets discarded"); if (pongWebSockets != null) { pongWebSockets.Dispose(); pongWebSockets = null; } }
// Use this for initialization void Start() { pongWebSockets = new PongWebSockets(); pongWebSockets.wsMessageArrived += PongWebSockets_wsMessageArrived; Application.runInBackground = true; }