I spent a few days reading and researching different ways of saving gamedata.
I have seen xml and playerprefs.
Which is the best way to save level progression and weapon unlocks?
A small code snippet would be good too.
I spent a few days reading and researching different ways of saving gamedata.
I have seen xml and playerprefs.
Which is the best way to save level progression and weapon unlocks?
A small code snippet would be good too.
Erm. You can deserialize the stuff to a .txt files and load it at runtime. Pros is the script is very easy to write but cons is the player may have acess to your files mainly the txt files.
Saving onto PlayerPrefs is the easiest method. I don’t really have any experience with XML so I can’t say anything about it. Text and binary file manipulation are also options (encrypted and obfuscated binary files being the only real option, as far as I’m concerned), but only to non-cribbers. PlayerPrefs was not designed to be a storage for game state and progress data, let alone a secure one, so unless you’re knowledgeable in file manipulation, I’d reckon that you’d prolly be better off going the XML route.
For simple things, keep with player prefs.
For complicated things… elbow grease
Thank you guys i will look into each method mentioned.
Anyone has any code snippets?
Player pref is good however i think it is not as flexible as making your own script to read from a text. For reading text files, try looking for Streamreader or textreader. Or if you really need i have a c# snippet. Which i made to read chinese character from a txt file. Which you can altered for your own needs.