예제 #1
0
 public static async UniTask ToUniTask(
     this RoutineHandle handle,
     PlayerLoopTiming timing             = PlayerLoopTiming.Update,
     CancellationToken cancellationToken = default)
 {
     await UniTask.WaitWhile(() => handle.IsActive(), timing, cancellationToken);
 }
예제 #2
0
 public static IEnumerator <RoutineHandle> GetEnumerator(this RoutineHandle handle)
 {
     while (handle.IsActive())
     {
         yield return(handle);
     }
 }
예제 #3
0
 public static IEnumerator GetAwaiter(this RoutineHandle handle)
 {
     while (handle.IsActive())
     {
         yield return(null);
     }
 }