So what I am trying to figure out is how to save the progress of the player in my game and how to let the player load the game back to the point where it was saved from.
I can create a giu that has the save/load button but i have NO idea of how to write the script that would make it work.
Does anyone have a script that does this or does anyone know a tutorial out there that can help a noob out?
Just to clarify I’d like to be able to save the location of the player and switches that the player may have activated in the story.
Thank you all for your time!
What you are talking about is a File I/O, which actually is not a Unity-specific concept. For file I/O you would use relevant functions provided by Mono/.Net . Google will yield plenty tutorials and resources that deal with this aspect.
Heres some reference to start you off:
http://www.go-mono.com/docs/monodoc.ashx?tlink=37@N%3ASystem.IO
… or, depending on what you need to save to save a game, you could potentially use PlayerPrefs. The technique that you use depends on the type of game and what you need to save.
From the sound of things, you need to store three floats, a series of booleans, and perhaps significantly more depending on what variety of game it is.
You can use PlayerPrefs functions for pretty much any of it, so long as you come up with a good string key scheme.