Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public void Test()
  2. {
  3. Observable.ReturnUnit()
  4. .SelectMany(_ => Observable.FromCoroutine(x => NestedCoroutine(x)))
  5. .Subscribe(_ => Debug.Log("Very Good:)"));
  6. }
  7.  
  8. IEnumerator NestedCoroutine(CancellationToken cancel)
  9. {
  10. yield return Observable.Timer(System.TimeSpan.FromSeconds(1))
  11. .FirstOrDefault()
  12. .ToYieldInstruction(cancel);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement