Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public void Test()
{
Observable.ReturnUnit()
.SelectMany(_ => Observable.FromCoroutine(x => NestedCoroutine(x)))
.Subscribe(_ => Debug.Log("Very Good:)"));
}
IEnumerator NestedCoroutine(CancellationToken cancel)
{
yield return Observable.Timer(System.TimeSpan.FromSeconds(1))
.FirstOrDefault()
.ToYieldInstruction(cancel);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment