- Home /
Save and Load Questions
I was thinking about the Save and load and has some more questions.
(1) How can you save Static Variables?
(2) What code do you need to save the game? and what do it save?
(3) How do Load a save file?
(4) Where do the file go on your computer?
(5) Save the Player Position and Object that been create like (Building, Loot) and Monsters that you kill.
(6) How would it work if you was to update the game? (What would be do big to not keep your save file?
For saving game data as a startup method you can use the PlayerPrefs provided by unity - http://docs.unity3d.com/ScriptReference/PlayerPrefs.html
This will create a player preference file based on the platforms you are running.For example,the data will be stored like this
PC - H$$anonymous$$CU\Software[company name][product name]
Android - /data/data/appname/shared_prefs/appname.xml
Linux - ~/.config/unity3d/[CompanyName]/[ProductName]
Using PlayerPreference you can write,integer,string,Float.For boolean use integer as 0 or 1.You can read any value at any time using PlayerPrefs.GetXX() methods.
Your answer
Follow this Question
Related Questions
Save and Load 2 Answers
Rotation no save to array 1 Answer
Save and load data with Javascript... 0 Answers
How to save and load the game of the corresponding player by Serialization 1 Answer
How to save and load any data type? 1 Answer