Sorry, I’m maybe too noob, but I’m making a game, and I want that when the player gets the objetive, it display something like “press space to continue” but when I get the objetive,unity freezes. Maybe I’m doing something too wrong, I don’t know, this is the code fragment with the error.
winText.text="You Win! You time is: "+finalTime+" space to continue";
while(true){
if(Input.GetKey(KeyCode.Space))
{
Application.LoadLevel(Application.loadedLevel+1);
}
}
Maybe the while(true) is bad? I need to make a coroutine? I’m not too good with that yet.
Thanks, sorry if my english is bad.