Best way to save and load data for each level in 2D game?
Hello!
I am relatively new to unity and coding, so I apologize in advance if my terms are off or something haha. I have been struggling for a some time now trying to figure out how to save and load data for individual levels. So basically, I want to have mainly 2 types of ammo in my game: light ammo, and heavy ammo. This would, ideally, be collected throughout the level, and the amount of each type collected would be saved when you end the level, and loaded for when you return to that same level. Now what I've been struggling with is how to save both ammo types to be specific values for each specific level (right now I have tried using a binary formatter to save/load the data, but to be blatantly honest, I don't really know what I'm doing). I have tried having two lists, one for each ammo type, with each index of the list corresponding to a scene number, but I just don't know what the most efficient way to do what I'm wanting to accomplish.
Any help would be greatly appreciated!