github Cysharp/UniTask 2.0.13
Ver.2.0.13

latest releases: 2.5.10, 2.5.9, 2.5.8...
4 years ago

First stable release of UniTask v2.
It has many improvement and some breaking changes from v1.


New Features

  • Almost all UniTask methods and async method automatically reuse(zero allocation) and reduced heap allocation size
  • Asynchronous LINQ, UniTaskAsyncEnumerable standard factory and all linq operators and Unity specified factory generator
  • uGUI component has ***AsAsyncEnumerable that converts event to async stream.
  • All async triggers(Cysharp.Threading.Tasks.Triggers) implements IUniTaskAsyncEnumerable<T>
  • Stacktrace in PlayerLoop shows current PlayerLoopTiming
  • Available .NET Core package in NuGet
  • Improved UniTaskTracker Window, enable a jump to the source file and TaskName displays generics type name
  • DOTween support in default(require to com.demigiant.dotween import from OpenUPM or define UNITASK_DOTWEEN_SUPPORT)
  • Addressable support in default(AsyncOperationHandle and AsyncOpereationHandle<T> as awaitable)
  • UniTaskCompletionSource can reuse by .Reset()
  • New last PlayerLoopTimings (PlayerLoopTiming.LastPostLateUpdate is same as WaitForEndOfFrame)
  • New AsyncReactiveProperty, AsyncReadOnlyReactiveProperty, that similar as ReactiveProperty in UniRx
  • New Channel.CreateSingleConsumerUnbounded, that is equivalent to System.Threading.Channels, similar as go channel
  • TaskPool to set/monitor pooling size by TaskPool.SetMaxPoolSize, TaskPool.GetCacheSizeInfo

New Methods

  • Add UniTask.Preserve, it converts to allow multiple await
  • Add UniTask.WaitUntilCanceled
  • Add UniTask.Create
  • Add UniTask.Defer
  • Add UniTask.Action/UnityAction
  • Add JobHandle.WaitAsync
  • Add CancellationToken.WaitUntilCanceled extension method
  • Add UnityEvent<T> and InputField AsyncEventHandler and extensions
  • Add WithCancellation method to all async operation extensions

Changed from UniTask v1

  • Namespace change: UniRx.Async -> Cysharp.Threading.Tasks
  • All UniTask/UniTask<T> can not await twice(will throw exception), Reusable Promise is discontinuance
  • All UniTask Factory method(such as UniTask.Delay) run immediately(same as standard Task, previously it does not run before call await)
  • All Trigger method combinates GetAsync***Trigger and Get***AsyncHandler and ***Async.
  • UniTask.Lazy returns AsyncLazy<T>
  • UniTask accepts IUniTaskSource instead of IAwaiter
  • UniTask.WhenAny return type is changed to (int winArgumentIndex, T1 result1, T2 result2, ...)
  • UniTask.WhenAll's tuple does not use specified name
  • UniTaskScheduler.UnobservedExceptionWriteLogType's default is changed to LogType.Exception
  • UniTaskVoid can not await
  • IObservable<T>.ToUniTask parameter order changed from CancellationToken cancellationToken, bool useFirst to bool useFirst, CancellationToken cancellationToken
  • UniTask.VoidAction is renamed to UniTask.Action
  • UniTask.DelayFrame return type is changed from UniTask<int> to UniTask
  • UniTask.Void/Action/UnityAction type is changed from Func<UniTask> to Func<UniTaskVoid>
  • Removed ConfigureAwait method from all async operation extensions(renamed to ToUniTask)
  • Removed new UniTask(factory), use UniTask.Create or UniTask.Lazy instead
  • UnityWebRequest's AsyncOperation calls UnityWebRequest.Abort() when detect canceled
  • JobHandle await extension does not accept CancellationToken
  • Lower Unity support version is changed to 2018.4.13f1
  • Modified directory structure, under Runtime and Edtior directory to follow standard UPM design

Don't miss a new UniTask release

NewReleases is sending notifications on new releases.