Created
February 20, 2017 10:58
-
-
Save neuecc/819c30bc297c5b698f5965df62d08fcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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