- Home /
How to make it so Unity remembers purchases made by players whenever they play? (C#)
I'm adding skins to my in-game store that players can buy for the player character. How do I "save" the purchase they've made and tell Unity that they should have the skin each time they play (for example, after changing levels or restarting the app)?
It's possible with PlayerPrefs, but not ideal as you'd lose any purchase history whenever they saved.
A better solution would be to host a database somewhere and register the IAPs there, then snapshot them onto the player's machine. You can save those locally with PlayerPrefs, but it'd ensure that you didn't lose purchases when you uninstalled.
Do you $$anonymous$$d breaking that down for me? I have no idea what any of that means, sorry haha. Still new to all of this.
Are you talking about in-app purchase? or just game currency in a standalone game?
Answer by MrMatthias · Apr 26, 2018 at 10:27 AM
For products in the apple or play store check whether the product has a receipt: Scripting Reference