/// <summary> /// Wait inside a coroutine till this future comes true /// </summary> /// <returns></returns> public IEnumerator CoWait(int timeout = -1) { long waitTill = AsyncManagerImpl.getCurrentTimeMs() + timeout; while (!finished) { yield return(null); if (timeout != -1 && AsyncManagerImpl.getCurrentTimeMs() > waitTill) { Debug.LogWarning("TIMEOUT COWait!"); break; } } }
public API(AsyncManagerImpl instance) { this.instance = instance; }