Hi, In my mobile game, I have virtual currency which can be bought in IAP. I call ORK.SaveGame.Save(ORK.Game.AutoSaveSlot); after successful purchase in IAP listener. According to my search in this forum, I can only save in autosave slot but not in current save slot in script, is that right? This will cause a problem, if I have two save slots A and B, and do the purchases in slot A(after successful purchase will auto save), then load slot B and do the purchase again, then the autosave slot will be overwritten. Is there anyway to save the game in current loaded slot in script?
You can save in any slot you want, e.g. to save in the 1st save game:
ORK.SaveGame.Save(0); The auto save slots are just special indexes, the code you posted is just for saving into the auto save slot the player selected (or is selected by default) at the start of the game, but the same function is used for all save games.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thanks GiL, and how to save in CURRENT slot? How to get current loaded slot index in script(not current autosave slot)? I know it's weird to auto save game in NON-autosave slot, but I have to save the change of the virtual currency after user purchases currency from IAP.
That's currently not accessible, I'll change that in the next update.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
ORK.SaveGame.Save(0);
The auto save slots are just special indexes, the code you posted is just for saving into the auto save slot the player selected (or is selected by default) at the start of the game, but the same function is used for all save games.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I know it's weird to auto save game in NON-autosave slot, but I have to save the change of the virtual currency after user purchases currency from IAP.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!