Hi,
Does a method has to return IEnumerator if you want to yield inside it? I mean if you don’t StartCoroutine it, then it still has to return IEnumerator, right?
I think it does but I don’t know why. I don’t want this code to co-run with my main code, I just want it to WaitForSeconds somewhere and then resume:
public IEnumerator ExplodeMeNAOW()
{
Debug.Log("Self destruct initiated, sir! :(");
GetComponentInChildren<ParticleEmitter>().Emit();
Destroy(gameObject);
yield return new WaitForSeconds(2f);
// Application.LoadLevel("GameOver");
}