KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Getting UniRx ReactiveProperty and ReactiveCommand to work with Noesis databinding

27 Apr 2021, 17:21

This is more of a FYI.

I have created an issue in UniRx's GitHub: https://github.com/neuecc/UniRx/issues/489

Like the common ReactiveUI for WPF, the also have a version of ReactiveProperty and ReactiveCommand which are based on the Observable async pattern.
Unfortunately unlike the ReactiveUI implementation, theirs doesn not implement the INotifyPropertyChanged and ICommand interfaces.

Now naturally in Unity those are not really needed, however I suggested they implement them, like the ReactiveUI framework does. Once they do that, Noesis should be able
to use those types in viewmodels and we could databind directly against them. That's a very useful thing to have I think.

UniRx shows how useful the stream subscription approach to data is in Unity, since data and events can rapidly come in considering the high framerate of a game and the a UI reacting to those streams can be more adequate that the classic event driven approach.

If I have the time I might write the pull request for it myself. if anybody else gets to it quicker than I, feel free to.

I think this would massively benefit Noesis since UniRx is widely used by Unity developers I think. (I'm also using their UniRx.async extension to replace the standard Task class with an allocation free and PlayerLoop adjusted UniTask implementation that works great for the Caliburn-like framework I'm working on. Stuff like causing propertychanged notifications to happen only on the UI thread is as simple as:

await UniTask.WaitForMainThread(); // This is actually used INSIDE the Notify method.
NotifyPropertyChangedAsync('PropertyName');

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 2255
Joined: 22 Dec 2011, 19:20

Re: Getting UniRx ReactiveProperty and ReactiveCommand to work with Noesis databinding

27 Apr 2021, 21:30

I'm sure this would be very useful for many users. I hope UniRx developers consider your suggestion.
Thanks.
 
User avatar
jsantos
Site Admin
Posts: 3139
Joined: 20 Jan 2012, 17:18
Contact:

Re: Getting UniRx ReactiveProperty and ReactiveCommand to work with Noesis databinding

28 Apr 2021, 11:39

Once this is solved, we should list this extension with the rest of integrations developed by third parties.

Who is online

Users browsing this forum: Google [Bot] and 3 guests