Please explain me Saving / Loading data logic (Serialization)
In my game, I have 24 collectibles prepared to collect. I need all of them to write to some file and read in proper time (for example when choosing level, where collectibles should be displayed like 1/3 collected in this level or something like that)
For the last 3 hours I am trying to understand serialization, JSON, XML, Binary, but I do not quite get it. I need to create a List (or array) to store the collected objects, they should have the ID of collectible (integer) and true / false statement (bool), whether collectible was already collected.
I prefer some solution, where I can "see" and browse in file, change values to true / false and test the game behaviour. Like XML or JSON.
I tried to follow some tutorials like this one https://gamedevelopment.tutsplus.com/tutorials/how-to-save-and-load-your-players-progress-in-unity--cms-20934 but I could not understand the logic.
Can someone please explain me how to achieve this? Collectibles are spread to many levels.
Any advice would be appreciated.
Answer by lubwn · Nov 15, 2017 at 04:36 AM
Ended up with downloading free asset Save Game Free, which is really easy to use. However, it can not save lists, so I am now saving items as string by name + number, so I am generating collectible names based on collectible number. Kind of crazy approach but it works for that purpose. Hope it helps someone.