Hi,
In my game, I have some levels that runs a loop until finishing the game. Inside the loops, there are some “yield WaitForSeconds(…)”. Also, I created a system that when I press esq, pause the game (set to Time.timeScale = 0).
I don’t know why, if I press esq in one of those levels and pause the game, after a while, the game crashs. I checked if there was any function trying to make the time becames 1 again, but there’s none. I really don’t understand what’s happening.
Could someone give me a light?!
Thank you,
Murilo.
After som tests, I figured out that, when I turn off this script, stop crashing.
function Start ()
{
animation.Play("reveal");
if(cardSelection.difficultLevel_static==false) //easy
yield WaitForSeconds (3);
else
yield WaitForSeconds (0.7);
animation.Play("hide");
yield WaitForSeconds (animation["hide"].length/1.2);
Destroy (this);
}
Honestly, I don’t see nothing that make the game crashs!
What do you think?
Thank you,
Murilo.
I can’t really see why that would cause a crash, which makes me suspect a bug. Please can you file a bug report for this (menu: Help > Report A Problem) and include a project that causes this error.