Static (Global) variables vs PlayerPrefs?

Hi!

I have now almost finished my very first game. Its a turn basedes mullitplayer game that uses Google Play Games for saving player data and playing turns. All my variables that I use in my game are declared as “public static int”. I have now stumbled upon something called PlayerPrefs and it seems to be the way others have done it… Is there a big problem with my solution? Like is it easier to hack my game and manipulate highscores? …from what I now have read it seems like the benefit with PlayerPrefs is that you save data to your device. Im not intrerested in that since i want my game to be able to constantly update the player preferences/experience points/highscore/level etc via the Google cloud.

//Erik

Yes PlayerPrefs would be accessible to people who know what they’re doing on their device, also you can lose that information by deleting/uninstalling the application. The google server side save would allow you to use past information say after they buy a new brand of phone and don’t cover over their application/data. It’s convenient to use these services from the users perspective.

It won’t be a big problem in my opinion, unless you made a graphic heavy, ultra super realistic game with a tons of variables. I once did a translation script with public variables, i thought it would take a minute or so to finish translate but it just happened instantly.

So you don’t need to change your whole script now but next time i suggest to use playerprefs instead.