Issues with scenes

I’ve just started Unity two to three weeks ago for a school project and I have no previous coding experience.

I’ve been following a endless 2D runner tutorial however I have been having issues regarding the enabling and disabling of scenes. Essentially, I have a Pause Menu and a Death Menu. Whenever my character dies the Death Menu is enabled allowing the user to restart, go to main menu etc. But I can’t figure out how to design it so the Pause Menu cannot be enabled whilst the Death Menu is enabled.

5377797--544659--02.PNG


5377797--544659--02.PNG

I’d add a reference to the DeathMenu in the PauseMenu script. Your current code in PauseMenu.Update, have it first check if the DeathMenu is disabled, only if that is the case to you then do your current check for the escape key. I’d write it really quick, but I don’t know what the Death Menu being enabled actually means in your game (does it mean a GameObject is set active? Does it mean a component has been enabled? etc).

Also, in the future post your code using [ CODE] tags directly into the forum, so people can easily just copy and edit it to show you what to change. Otherwise with images they have to retype it all based on what is in the image.

Cheers for the reply, a game object with the Death Menu script is being enabled/disabled. My original idea was to check if the DeathMenu was enabled before the key was pressed with an if statement as you suggested but I didn’t know how to word it.