I have several coroutines always running.
I want to put these coroutines on hold as I set the game to pause mode.
Consider the content of these coroutines as follows
while (timeleft > 0)
{
if (pause)
{
continue;
}
...
timeleft -= Time.FixedDeltaTime;
yield return null;
}
I thought that would be okay to insert the if(pause)
clause to have the coroutines to wait while pause is up.
What, insted happens is that (I guess) these infinite loops make unity not responding so that I have to kill the process.
Can I be right in thinking that the system does not like coroutines to be in a potential infinite loop? Or that is just okay and I have to heavily debug somewhere else?