private IEnumerator CoroutineCleanup() { yield return new WaitForSeconds(5); mServer.Dispose(); mClient.Dispose(); mServer = null; mClient = null; if (mState == State.TestSuccessful) { Debug.Log("------------All tests successful!-------------"); } }
private void StartTest() { if (WebRtcNetwork.IsAvailable() == false) { Debug.LogWarning("WebRtcNetwork not available. Please run it in WebGL to test WebRtcNetwork!"); } else { Debug.Log("WebRtcNetwork available. Starting test."); mServer = new WebRtcNetwork(); mClient = new WebRtcNetwork(); Debug.Log("Instance created"); mState = State.ServerInit; Debug.Log("Start test " + mState); mServer.StartServer(); } }