Open Collective
Open Collective
Loading
Released v6.0.0
Published on July 10, 2018 by Yoshifumi Kawai

Re-booted UniRx with the new feature UniRx.Async


Improvement platform supports


* Support .NET Standard 2.0

* Support .NET 4.x

* Support UWP on .NET/IL2CPP

* Support C# 7.x on Incremental Compiler


UniRx.Async module on Unity Incremental Compiler(C# 7.x)


`UniRx.Async` is custom async/await support instead of `Task`.

This does not depend `UniRx` so you can use separate `UniRx.Async` package without `UniRx`.


* Add `UniTask`, `UniTask<T>`, `UniTaskVoid` instead of `Task`, `Task<T>` and `void`

* There work on custom async method builder in `async/await`(uses [C# 7.0 task-like feature](https://github.com/dotnet/roslyn/blob/master/docs/features/task-types.md))

* It no depends `Task` and `SynchronizationContext`, completely unity threading friendly and achives no-overhead, less garbage

* `UniTask.Delay`, `UniTask.Yield`, `UniTask.Timeout` that is frame-based timer operators(no uses thread so works on WebGL publish) driven by custom PlayerLoop(Unity 2018 experimental feature)

* `UniTask.WhenAll`, same as `Task.WhenAll` but you can get awaited value by tuple deconsruction syntax

* `UniTask.WhenAny`, same as `Task.WhenAny` but you can get which index win

* `UniTask.ctor(Func<UniTask>)` is like the embeded [`AsyncLazy<T>`](https://blogs.msdn.microsoft.com/pfxteam/2011/01/15/asynclazyt/)

* `Promise<T>` is the lightweight edition of `TaskCompletionSource<T>`, the API is same as EcmaScript's Promise

* await support for unity async objects(`AsyncOperation`, `ResourceRequest`, `UnityWebRequestAsyncOperation`, `IEnumerator`)


Redesigned ReactiveProperty and ReadOnlyReactiveProperty


* Inlined publisher(prev design uses `Subject<T>`, current uses self iteration)

* Returns subscription as node-self(does not create extra garbage on subscribe)

* Removed `ReactiveProperty.ctor(IObservable<T>)` overload

* Modified `IObservable<T>.ToReactiveProperty` returns `IReadOnlyReactiveProperty<T>`


Removed obsolete components


* `IEnumerable<T>.AsSafeEnumerable<T>`

* `LazyTask<T>`

* `UniRxSynchronizationContext`

* `MainThreadDispatchType.AfterUpdate`

* `ObservableMonoBehaviour`

* `TypedMonoBehaviour`

* `IPresenter`, `PresenterBase`, `PresenterBase<T>`