Skip to content

Instantly share code, notes, and snippets.

@vrobel
Created June 26, 2013 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrobel/5868022 to your computer and use it in GitHub Desktop.
Save vrobel/5868022 to your computer and use it in GitHub Desktop.
How to check if a coroutine has finished its execution in the first frame or yield break was called
var coroutineEnumerator = StartCoroutine();
var coroutine = StartCoroutine(coroutineEnumerator);
if(coroutineEnumerator.Current != null)
yield return coroutine;
else
//we are here in the same frame if the coroutine ended
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment