Hello,
I've figured out how to save and load stuff but I was wondering how I would go about making multiple save slots. It surprised me how little information I could find about this. All I need is some example code or another post about this that could get me on the right track.
Thanks in advance!
-Landen
Creating multiple saves or slots
Re: Creating multiple saves or slots
Hi Landen,
To create save slots you simply need to specify a separate file for each save slot and save and load using that file. For example, when the player selects a save slot, you could put the filename into a static variable. i.e.
Joel
To create save slots you simply need to specify a separate file for each save slot and save and load using that file. For example, when the player selects a save slot, you could put the filename into a static variable. i.e.
if(playerPressesSlot1Button) saveSlot = "slot1.json"; else if (playerPressesSlot2Button) saveSlot = "slot2.json";And then when you come to save and load, simply use the filename specified by this static variable.
ES2.Save(myData, saveSlot + "?tag=myData"); myData = ES2.Load<string>(saveSlot + "?tag=myData")All the best,
Joel
Re: Creating multiple saves or slots
Thank you so much!
I got my save slot system working great.
I got my save slot system working great.