// Update is called once per frame void Update() { if (gameOver) { if (Input.GetKeyDown(KeyCode.P)) { //spawn the player Instantiate(_player, new Vector3(0, -3, 0), Quaternion.identity); //set gameover to false gameOver = false; //hide the main menu _UIManager.HideMainMenu(); } } }