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