checkpoint level please

Hi , i’m trying to make checkpoint save/load level ,
like when i’m in level 13 then closing the game then open it i’m still in level 13.

How to do that ???

It depends really - if its just the level then store the current value in PlayerPrefs with SetInt(Application.loadedLevel) or SetString(Application.loadedLevelName).

Then in your opening scene have an object with an Awake() function that decides whether it should reload, and just read the value out of player prefs.

If you actually want to store more data then you should consider Unity Serializer

For this you can use PlayerPrefs:

So, for example, every time you advance to a new level, you would save it like:

PlayerPrefs.SetInt("Player Level", currentLevel);

then on the load next time, you just say:

currentLevel = PlayerPrefs.GetInt("Player Level");