Game Saving Question

Hi,

I was wondering if there is any script out there that can save your current status in a game? Can you make is a option in a game to allow the user to save where there are at in the game so that they can go back to it later.

Thanks
kcarriedo

Sure you can save the game; generally easiest to use PlayerPrefs. No there isn’t a script, because it depends on your game. Basically you write the variables that you care about to save the game, then read them in again to load it.

–Eric

Hi there

I’ve been looking through the forum hoping that Unity has a “All-in-one” solution to this problem as well however I’m 100% sure there isn’t one (at the moment) that you can simply plug into your game. I’ve noticed that lots of people try to implement a saved game solution by using the PlayerPrefs class found here in the documentation: Unity - Scripting API: PlayerPrefs.

How it works (in a nut shell):
During your game and/or when the application is terminated you try to save the state of your game objects using the PlayerPrefs functions. Unfortunately it doesn’t have a function to set/save a game object in it’s native form, … so you have to save the state of your objects using Strings, Ints, Floats etc.

When you start your game (again) you read these values back in and try to re-create your game objects by using the values that these functions return etc.

Have a search around cause there’s lots of posts regarding this challenge and I’m still learning this as well.

Cheers.

http://www.anbsoft.com/middleware/ezs/index.htm

is this what your looking for?

Thank you everyone on your feedback. I will look into using playerpref. and see what I can come up with. Thanks again for all your help

kcarriedo