void runCoroutine() { MainThreadDispatcher.Dispatch(() => CoroutineRunner.StartRoutine <T>(coroutine(), c => { try { Fulfill(c.returnValue); } catch (Exception ex) { Fail(ex); } })); }
public Promise <T> RunAsync(IEnumerator coroutine) { CoroutineRunner.StartRoutine <T>(coroutine, HandleCallback); return(promise); }