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