public IEnumerator coCancel <T> (int numFrames, Wooroutine <T> routine) { // Debug.Log("start stop routine " + Time.frameCount); yield return(new WaitForFrames(1)); // Debug.Log("stop at " + Time.frameCount); routine.Stop(); }
public void CloseWebsocket() { if (listenRoutine != null) { WooroutineRunner.StopRoutine(listenRoutine); } if (_webSocketWoo != null) { if (_webSocketWoo.Completed) { _webSocketWoo.ReturnValue.Close(); } else { _webSocketWoo.Stop(); _webSocketWoo = null; } } }