Beispiel #1
0
        public static UniTask WaitUntil(Func <bool> predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken))
        {
            var promise = new WaitUntilPromise(predicate, cancellationToken);

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