Deos anyone have a RespawnMenu script? All i want is so when I die is that gui buttons will pop up saying return to menu and respawn. I am an ok coder so i can probably edit i just don't know where to start. Does someone have a sample i can use and tweak in C#? I would still like scene view to be enabled i just want ti so the camera and movement gets locked Thanks
make a canvas, with the two buttons. Configure the two buttons to do what you want. In your game manager script (whatever runs the game and keeps track of the playing/gameover states) create a canvas variable and drag the canvas into the slot in the inspector. In the GameManager script's start function disable the canvas. When the player loses and you enter the gameover state, enable the canvas. If you're not keeping a track of the "state" of your game (playing, gameover, menu etc.) you should probably start there instead...
Just have a bool if you want to keep it simple e.g. playerDead = false at the start & when they die change it to playerDead = true Have an if statement in your manager script that says if(playerDead){insert your code here for what you want to happen e.g. Activate your buttons } Make sure when they click the button to restart that you reset anything you were keeping track of like scores etc if you need to.
Not knowing exactly how you are doing everything I will answer based on my own stuff. Things that determine multiple stuff that aren't specific to one object I tend to put into the manager script, so that's where I'd put it. This is just because I would probably also use the bool to determine when timers start/stop, enemies can move, the player can move, backgrounds scroll or update, menus &/or buttons &/or text displayed etc Each of the relevant object scripts would access the bool from the manager script.