Coroutine loop not working

Hi everyone,

I’m currently stuck on a Coroutine loop that does not seem to work.

I’ve tried simplifying the loop to its essence to see what is wrong, but to no avail. Here’s the code:

void Start()
    {
        StartCoroutine(Timer());
    }

    IEnumerator Timer()
    {
        while (true)
        {
            Debug.Log("Here it works");
            yield return new WaitForSeconds(1f);
            Debug.Log("So does here");
        }
    }

Basically, the first Debug.Log shows on the console just the first time, while the second never appears.

I can’t seem to find the issue, what am I missing?

Thanks in advance for the help.

Cheers

What’s the output that you’re expecting??

A. You are deactivating the object with the script attached.

B. You are setting the Time.timeScale to 0