Questions tagged [unirx]
30 questions
1
vote
2 answers
UniRx doesn't have Observable.Generate() method
.NET Reactive Extensions has a neat method to generate sequences using corecursion which is called Observable.Generate.
I can't find an equivalent for that method in UniRx (Unity Reactive Extensions). Could you please help me to port this code…

nipunasudha
- 2,427
- 2
- 21
- 46
1
vote
2 answers
Observable.FromAsyncPattern & UdpClient C#
i want to be able to use reactive to receive udp packages asynchronously.
i've written this block of code.
udpServer = new UdpClient(20000);
remoteEP = new IPEndPoint(IPAddress.Any, 20000);
var read =…

jurasans
- 151
- 1
- 8
1
vote
2 answers
How to properly match sequence in reactive programming
So I wanted to use UniRx in Unity to try reactive programming. I gave myself a simple task. Have a stream for key presses for W A S D keys, print to the screen whenever any key is pressed, and display a Combi happened whenever the sequence WASD…

Mehdi Saffar
- 691
- 1
- 8
- 24
0
votes
1 answer
the "This" keyword front of constructor parentheses - C#
I know about "This" keyword and what is it working. but what is this using for?
public ReactiveProperty() : this(default(T))
{
}
I have seen this in UniRx Project. I just don't know the "This" keyword front of constructor.
I googled it but there…

DeadDreams
- 53
- 5
0
votes
1 answer
UniRX using Merge operator for Shared observable
I have issue when using Merge for shared observables. In my project I have several streams that loads different data which must be added by certain order. So I've made simple example to find a solution. And the issue is that the 2nd merged…

HedgehogNSK
- 59
- 7
0
votes
1 answer
How to observe adding child GameObject and get it with using UniRx?
First, please see my code.
using UniRx;
using UniRx.Triggers;
.......
var parent = new GameObject("parent");
parent.OnTransformChildrenChangedAsObservable()
.Subscribe(_ =>
{
Debug.Log("child…

Shintaro Nomiya
- 85
- 1
- 11
0
votes
0 answers
RX programming - how to get previous messages from MessageBroker?
I use UniRX (C#) which tries to resemble RXJS and others.
I try to make sure my network-dependent objects initialize after the data arrived.
Some of my objects get created and Subscribe later than MSGPlayerDataLoaded actually fired thus never…

Sergey Yakovlev
- 1
- 4
0
votes
2 answers
Is it possible to make RactiveProperty public get private set in UniRx
I have two classes. One of them have BoolReactiveProperty. I want the second class to be able to subscribe only without being able to change the value. This is my current code
public class SourceToggle : MonoBehaviour
{
public…

TANDEROID
- 31
- 4
0
votes
1 answer
Reactive accumulation of data coming in bursts
The problem: there is a stream of numeric values. Values are pushed in bursts so 100 values can come very close to each other (time-wise) say each 5-10 ms and then it possibly stops for a while, then can burst again.The idea is to show accumulated…

Szymon Gatner
- 47
- 8
0
votes
1 answer
Is there a way to specify a variable number of Observable in Observable.WhenAll()?
I'm applying reactive programming to the Unity3D project.
Is there a way to specify a variable number of Observable in Observable.WhenAll()?
Sample or search results suggest an explicit way to enter all non-variable items, most of which are not…

오명근
- 15
- 1
- 4
0
votes
2 answers
How can I split the integer stream into buffers using conditional windows instead of time based windows?
I have an Observable that returns integers like so:
1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0
How can I convert this Observable to return arrays of those integers splitting stream not by the time based windows but by value based…

Rustam
- 113
- 1
- 2
- 9
0
votes
1 answer
UpdateAsObservable() vs EveryUpdate() in UniRx?
What's the different between:
UpdateAsObservable()
EveryUpdate()
in UniRx?
Are they the same?

Jemal Rashidi
- 1
- 1
- 1
0
votes
1 answer
Subscribing to computed value from collection elements
I have ReactiveCollection of PlayerBuildings. Is it possible to subscribe to this collection only when ProductionPerHour or ProducedResourceId value will change ?
I mean something like this ?
public void Sub()
{
var collection = new…

Malv20
- 159
- 4
- 11
-1
votes
1 answer
Reactive Property is not set to an instance of an object
I try to study UniRX. And I write the simple script for controlling player:
'''
using UnityEngine;
using UniRx;
using UniRx.Triggers;
namespace playerV1
{
public class Inputs : MonoBehaviour
{
public static Inputs Instance { get;…

Azag_Tot
- 11
- 2
-2
votes
1 answer
How to write a SelectManyLatest operator in Rx.NET and UniRx
SelectManyLatest is necessary operator.
But All Internet don't answer how you can write it.
So how?
SelectManyLatest is a FlatMapLatest in other Rx Frameworks.
This operator like SelectMany but it complete previous subscription if new emit happens.

Dmitry iLinikh
- 1
- 2