/// <summary> /// Note: publishEveryYield is always false. If you want to set true, use Observable.FromCoroutine(() => selector(x), true). This is workaround of Unity compiler's bug. /// </summary> public static UtyRx.IObservable <Unit> SelectMany <T>(this UtyRx.IObservable <T> source, Func <T, IEnumerator> selector) { return(source.SelectMany(x => FromCoroutine(() => selector(x), false))); }
public static UtyRx.IObservable <Unit> SelectMany <T>(this UtyRx.IObservable <T> source, Func <IEnumerator> selector, bool publishEveryYield = false) { return(source.SelectMany(FromCoroutine(() => selector(), publishEveryYield))); }