Restart Game from Button, not SceneMangement

Hi guys! Is there any command where I could restart the game completely. I don’t want to use scene management to get me to the first scene. I was thinking if there would be any re start option in the engine.

If you’re only using UI for your game, you can make an Init function to reset all the values to default.
Otherwise, SceneManagement is the best scenario to restart the game.

Put this OnClick function on your Restart button

  public void OnRestartButton(){
     
             SceneManager.LoadScene("FirstScene"); //Place the name of your first scene here
         
         }