Turn Start Game button to Continue button

What approach should I do

The player clicks START GAME, then when the First level loads and he exits the level
the START GAME button turns to Continue, where he is sent to the Last loaded level. :slight_smile:

Any thoughts? :slight_smile: thanks!

You’d have to use a variable that persists through your scene-switch.

Create a static variable e.g.

public class LevelManager {
   public static string currentLevel = "MyFirstLevel";

and change this variable when the first level is completed:

LevelManager.currentLevel = "MySecondLevel";

Other options would be to create a persisting GameObject, using DontDestroyOnLoad or store that variable permanently (even after the application has closed) using PlayerPrefs.

you’re might intrested in this tutorial:

The way I’ve picked for dealing with this sort of problem is just to have two buttons in the same space and just activate/deactivate them as needed with.

/*Assuming you have some central script handling your buttons, just use the GameObject for the buttons instead of "this.gameObject". */