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); }
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; }