$ ./guess_the_languageGame Dev
Game Dev · medium · #103

What does this coroutine line do?

coroutine: yield return new WaitForSeconds(2f);
  1. Pause the routine for two seconds
  2. Destroy the object after delay
  3. Run the code twice in a row
  4. Block the entire main thread
The coroutine suspends and resumes after two seconds without blocking the game.
Play Game Dev ▸