예제 #1
0
        public static UniTask WaitWhile(Func <bool> predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken))
        {
            var promise = new WaitWhilePromise(predicate, cancellationToken);

            PlayerLoopHelper.AddAction(timing, promise);
            return(promise.Task);
        }
예제 #2
0
 public static UniTask WaitWhile(Func<bool> predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken))
 {
     var promise = new WaitWhilePromise(predicate, timing, cancellationToken);
     return promise.Task;
 }