Comments (2)
Observable.EveryUpdate is an infinite sequence generator and Where is only filter.
For example, if sequence returns 10 or less again, Where throughout the value again.
// 0,1,2,3,4,5,6,7,8,9,-10,-11,-12,-13,....,
Observable.EveryUpdate()
.Select(x => (x >= 10) ? -x : x)
.Where(x => x < 10);
If you want to stop sequence, you can use Observable.TakeWhile
.
Observable.EveryUpdate()
.TakeWhile(x => x < 10)
.Subscribe(x => Debug.Log(x), ex => Debug.LogError(ex.Message), () => Debug.Log("completed"));
See: Intro to Rx's Reducing a sequence section.
http://www.introtorx.com/content/v1.0.10621.0/05_Filtering.html
from unirx.
Thanks a lot for your perfect response!
I really appreciate for your work.
from unirx.
Related Issues (20)
- Awaiting to a filtered ReactiveProperty HOT 1
- What is the difference between Timer and Delay?
- ObserveOnMainThread does not propagate events from background threads to main thread
- TimeScale doesnt effect to Observable.Timer(Scheduler.MainThread)
- Bug: `InvalidOperation` does not use correct error message HOT 1
- Make repeat on error, but when other Observable method succeed
- How to convert this to a WhenAll pattern? HOT 2
- `CancellableDisposable` does not call `_cts.Dispose()` HOT 1
- Switchmap equivalent? HOT 3
- 1
- Why does ReactiveProperty call GC.SuppressFinalize(this) if it has no finalizer?
- In Unity 2021 when i upgrade UniRX to latest vesion getting issue related to observable HOT 1
- Observable from UnityWebRequest calls OnComplete although status is still InProgress HOT 1
- Is the order of Subject to events in the same frame guaranteed?
- Incorect summary of method OnBeforeRent in ObjectPool
- `Object.FindObjectsOfType` is obsolete
- The CancellationTokenSource created within CancellationDisposable is not being disposed
- ReadOnlyReactiveProperty does not call OnCompleted in some cases
- Wrong OnCompleted timing of ZipObservable
- When Reload Domain option is disabled, Observable.EveryUpdate is called multiple times in one frame
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unirx.