Buttons not hiding
I have a problem where I have my character and he dies. Upon death, the character is killed and it pulls up a main menu button and a respawn button. The main menu button works fine and puts me into the main menu scene. The problem I am having is when I click respawn, it restarts the scene and the "You Died" text goes away, but the respawn and main menu buttons won't. Here is my code and if anyone could help me figure out why my buttons won't go away that would be greatly appreciated. Here is my code:
void Update ()
{
dead = PlayerController.dead;
if (dead >= 1)
{
respawn.SetActive (true);
mainmenu.SetActive(true);
dead=0;
}
else{
if (dead >= 0)
{
respawn.SetActive (false);
mainmenu.SetActive (false);
}
}
}
Your answer

Follow this Question
Related Questions
Scripting Errors 1 Answer
How to move model on x axis in increments of 1? Starting from zero at a range of -2 to 2. 2 Answers
I have an array from which spawns a random image. Instantiate spawning full pool on start 1 Answer
AnimationComplete() Error 0 Answers
Anim object with Relative Position 1 Answer