Guys... Is there anyway other than using a PlayerPrefs to store a variable? I have this static int gold which is going to be an In App Purchase and I just need to be sure the values don´t get reset to 0 each time the user plays Thanks!
There's heaps of ways Can I ask why you don't want to use PlayerPrefs though? It would be by far the simplest method if you only need to store a single integer..
Since it is going to store the información after the user makes a purchase, I am afraid someone can look for the info stored and change it to "have more than what they buy"
Yeah I can understand your concern. However, whichever way you decide to store the data, someone will be able to gain access to it with enough determination. You could store it in PlayerPrefs but obfuscate the value by encrypting it, which will make it harder for honest thieves, but again, it wont stop anyone with enough determination.
Do you know any good way to encrypt them and to decrypt them when the game needs to retrieve that info?
There's quite a few. Base64 is very simple and easy to implement, maybe too simple tbh.. but it depends on how determined you think your users will be to access the data. There's also AES and more.. a quick search should bring up the various algorithms out there.