Questions tagged [unirx]

30 questions
3
votes
1 answer

C# Return variable as observable

I have method that load some character data from outer db to inner db (infoBase) that looks like some kind of list of CharacterInfo objects. The method returns observable. But if user tries to load character data that is already loaded I wish to…
3
votes
1 answer

Invalid cast of IObservable, runtime exception

I'm creating a helper to filter specific types of objects in a stream/observable. This is the gist: public interface IGameAction { } // Example action public struct OpenDoorAction : IGameAction { } // In Store.cs public Subject
altschuler
  • 3,694
  • 2
  • 28
  • 55
2
votes
0 answers

ObserveEveryValueChanged not receiving all changes

I am using UniRx library extension which is a reactive extension for unity, build on System.Reactive. I have this subscriber with the role of printing the value it received (not only that but the entire code of it is useless in this…
1
vote
0 answers

Is there a way to SKIP the first execution of operators in unirx?

What we want to do In the click event The first time, the value will be sent without a wait time. For the second action, the value is passed on one second after the event has settled down. Problems I was thinking that the following code could be…
harutaka
  • 61
  • 3
1
vote
1 answer

The type or namespace name 'UniRx' could not be found on Unity

I pretty much looked everywhere... but couldn't find anything that could debug my problem. The only thing I do in a script is "using UniRx" to have the following error : The type or namespace name 'UniRx' could not be found. What i tried: On Unity,…
Lisac1
  • 21
  • 1
  • 5
1
vote
0 answers

UniRx how to publish new values in a stream by combining itself with another stream

I'm trying to update an object position stream by combining the speed stream with it and publishing the new position in that position stream, I'm doing this by subscribing to the combined stream in Start(): Observable.CombineLatest(position_stream,…
Mahsa
  • 41
  • 9
1
vote
2 answers

what type of observable UniRx CombineLatest() operator returns ? cold or hot?

i'm using UniRx to use streams in unity. im using the CombineLatest() operator to combine two subjects and publish this value in one of the streams. when i'm using the generated value outside the .Subscribe() the OnNext() is called and works…
1
vote
1 answer

How to combine IObservable sequences in UniRx/Rx.NET?

I'm using the UniRx flavor of Reactive Extensions for the Unity3D game engine. Unity uses C#, so I guess it's similar to Rx.NET. I need a more beautiful way of checking when several observable sequences complete. In the example below, one of the…
Max
  • 13
  • 3
1
vote
2 answers

Are there something like ThrottleWhile or SubscribeAsync in reactive?

I have an asynchronous subscribe logic and when it run I don't want it to run again until that logic is finished. But if there is any event observed while the logic is run, it will be throttle until the subscribe logic is finished, and then fire…
Thaina Yu
  • 1,372
  • 2
  • 16
  • 27
1
vote
3 answers

What is the difference between a BehaviorSubject and a ReactiveProperty in UniRx?

What is the difference? To me they seem very similar... Why would you use one over the other?
bobbaluba
  • 3,584
  • 2
  • 31
  • 45
1
vote
0 answers

UniRx Scheduler with custom time scale

Is there a way to create a Scheduler that has additional time scale applied? Say a unit in a game is slowed down, I'd like it's Scheduler run slower so that all streams based on that Scheduler run slower as well.
1
vote
1 answer

Can one Observable() handle the Subscribe for two situations?

I'm applying reactive programming to the Unity3D project. Entering a character in InputField enables the button and disables it if there are no characters. Can this logic be processed in one stream using…
오명근
  • 15
  • 1
  • 4
1
vote
1 answer

C# reactiveX multitouch drag clear buffer on OnPointerUp Event

I'm trying to implement multitouch drag in unirx for unity. I use the Buffer(count, skip) overload to get last to events for each finger and calculate the distance. I now would like the clear the Buffer when a finger is lifted, otherwise the old…
1
vote
3 answers

How to merge to arrays using Rx

I need to merge 2 arrays using UniRx in order to get Observable which emits first elements of arrays then second elements and so on, then emits the rest of the longest array I tried Zip but Zip cuts the tail of longest array I tried Merge with…
1
vote
1 answer

Emit value from stream at most every x seconds

How can I construct an Observable stream that will emit a value, then skip subsequent values for x amount of time? I have tried using throttle and a combination of skipUntil and delay, but I need all values emitted in the given interval to be…
altschuler
  • 3,694
  • 2
  • 28
  • 55
1
2