Hello,
I am developing a mobile game (android). I have some data in game (virtual currency, unlocked levels, …) that will be stored in PlayerPrefs. PlayerPrefs are easily accessed from any user, so I developed custom encrypting system (changing letters in strings, coverting integers to strings and encrypting them, …). My encrypting system is defined in a script. My question is: Can users access this particular script, after they downloaded game from Google Play ? If so, they can easily see, how values are encrypted.
Regards, L
Anybody who wants to get into your scripts can do so. It just is what it is. Crackers have been doing this for years and years and years and developers have been trying to stop them just as equally. I’m not going to go into the entire details, but I will say it’s not worth your time to worry about it. Big gaming companies usually spend tons of money hiring other companies like denuvo to try and protect their games.
If you are concerned with it, you’d have to get your encryption key from somewhere and not have it hard coded. But honestly, unless you have a good reason to, what you are doing now is probably enough to keep your average person from poking around and knowing how to unlock stuff without paying.
It is possible but unless your game gets huge or its IAP is very expensive it likely won’t happen.
Really once you make it harder than editing a text file you will have already made it take more effort than most or willing to put in. So just don’t use playerPrefs but serialize it yourself with the BinaryFormatter or encrypt it with something.
Also if you are not already you should be il2cpp as your runtime as opposed to mono, it’s pretty much a one step process to extract code from mono assemblies but doing so for il2cpp is a little more complex.