In other words, how can I load the progress for a game? I only want to store a score and load it again when the game starts (ex. if I get the 100 score and close the game, when I come back, I want to continue my progress from the 100 score)
1 Answer
2
-
1\$\begingroup\$ The usual caution here is that PlayerPrefs is trivial for users to edit, so make sure you don't trust the data found in this file for things like public leaderboards or awarding trophies / DLC / other entitlements. If your case is pure single-player it may not be important, but it can be demoralizing for players who worked hard for those perks to see peers get them through simple hacking. (It's arguably impossible to completely secure a web game, but you do have choices for how many speed bumps you want to put in a hacker's way) \$\endgroup\$2016-01-29 20:59:45 +00:00Commented Jan 29, 2016 at 20:59
-
\$\begingroup\$ Thanks for that @DMGregory . Yes
PlayerPrefsis for anything you don't care if the player goes and changes it however they please. Local highscore display? Psh, if they want to hack that no one cares. For more complex save stuff, you still have to assume that the player will find a way to rewrite the file. \$\endgroup\$Draco18s no longer trusts SE– Draco18s no longer trusts SE2016-01-29 21:03:53 +00:00Commented Jan 29, 2016 at 21:03