I set up a very simple coroutine which pauses at the first yield return null
, but it never gets going again.
void Start() {
// Other stuff
StartCoroutine(RefreshAreas());
}
IEnumerator RefreshAreas() {
Debug.Log("RefreshAreas() started."); // I see this in the console
yield return null;
Debug.Log("RefreshAreas() continued."); // This never happens
}
I do have the object set to start early in the script execution order, but I didn’t think this would change anything. I’ve also tried yield return new WaitForEndOfFrame()
and yield return new WaitForSeconds(1.0)
and the second log message still never appears in the console.
What am I doing wrong, how do I get the rest of the function to execute?