Welcome, Guest
Username: Password: Remember me

TOPIC: Not safe to store localization in player prefs

Not safe to store localization in player prefs 1 week 8 hours ago #2502

  • jswigart
  • jswigart's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Our game has quite a large localization table(pulled from google spreadsheet). We have about 5300 terms, and eventually will have about 9 languages. For now most of those language columns are empty.

Already we are getting exceptions to the max data that can be stored in the player pref.
docs.unity3d.com/ScriptReference/PlayerPrefsException.html

The documentation suggests this exception is isolated to web player builds but we are getting it on desktop builds. Maybe that much data can't be stored in the registry in one key on windows or something.

The player prefs is not the place to store bulk data like this. Reaching the limit of pref storage in this way will likely also break the storage of other pref data completely unrelated to localization.

I would recommend downloading and caching data to a standalone file in Application.persistentDataPath(which would incidentally be easier to support multiple sources)

This should be a priority 1 bug I think.
Last Edit: 1 week 8 hours ago by jswigart.
The administrator has disabled public write access.

Not safe to store localization in player prefs 6 days 17 hours ago #2505

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 873
  • Thank you received: 189
  • Karma: 55
Hi,
You are right, most games don't have that much text, so I have never experienced a limit, but playerPrefs its indeed not the best place to store the downloaded data.
I will route it to a file and upload a new build to the beta folder!

Thanks for reporting this!!
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.

Not safe to store localization in player prefs 6 days 16 hours ago #2507

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 873
  • Thank you received: 189
  • Karma: 55
BTW, I just made the change, and uploaded v2.8.1a1 to the beta folder.

Hope that helps,
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.

Not safe to store localization in player prefs 6 days 9 hours ago #2508

  • jswigart
  • jswigart's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
excellent response time. thanks!
The administrator has disabled public write access.
Time to create page: 0.112 seconds
Colors