Created
June 26, 2013 14:53
-
-
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
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
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