Warning ABSOLUTE beginner here. Wanting to load Scenes as levels

I’m a complete beginner. I literally started last week. I’ve had a few challenges but nothing I couldn’t overcome and had a lot of fun doing so. That is until this problem. I am trying to make a simple game where players overcome obstacles in a scene and progress to the next scene. The act of moving on to the next scene = leveling up. I cannot seem to figure out how to

  • save the scene as a level
  • then load the same back on whatever “level” the player was last one.
    I’ve literally spent the last 6 days searching the internet for answers, watching vids, reading blogs and the Unity manual but with no luck. I always figured if I had the question someone else had it before me but maybe I am asking the wrong questions because everyone is showing how to go from one scene to the next and everyone is show how to save and load imaginary values like “health” and “power” but no one is combining the two principles together. As you can imagine its a little frustrating but also educational. I’m absorbing the information and learning a lot but I’d also like to actually move on to the next phase.

I’m hoping someone here can help me. I need to create a script that when i click a button in game will save the Player’s current “level” ie the Scene number and then when the click Load Game in the main menu, it will take them to the last saved “level” ie that scene.

I just need either someone to point me in the direction of where I can find the information that will teach me how to do this or even the first steps of the coding. I can figure out the rest. I’d be grateful for any help I can get. Thanks in advance.

(In case anyone is wondering what I’ve accomplished in the week since I started I created the entire framework of my game Its very simple of course (by using google and following tutorials) and I intended to start adding more complicated mechanics as the levels increased so its important for me to be able to get this figured out lol)

If you just need to save a string or number for the current level, you can just use PlayerPrefs. Unity also supports standard C# file saving/loading.