Hi all,
For my application, I can't use the ES3Cloud code directly (no mysql on the server), but even when testing with that, I'm running into the 1MB PlayerPrefs limit on webplayer: I have my ES3 file contents in a string in the player and am asking how I feed that into a non-filesystem-backed ES3File (or elsewhere) to be able to do ES3.Load's... for all my objects without having to worry about the 1MB limit?
I searched the forum, docs, and tutorials for a while and tried a bunch of stuff to get this to work with no luck so far, any help is much appreciated!
Hitting 1MB PlayerPrefs limit on webgl
Re: Hitting 1MB PlayerPrefs limit on webgl
Hi there,
I don't believe PlayerPrefs is limited to 1MB on WebGL (this was only the case in the Unity Web Player).
If you want to store data in RAM rather than on disk, you should use the Cache (this is documented here). You can then use ES3.LoadRawString to get the data from the cache as a string.
All the best,
Joel
I don't believe PlayerPrefs is limited to 1MB on WebGL (this was only the case in the Unity Web Player).
If you want to store data in RAM rather than on disk, you should use the Cache (this is documented here). You can then use ES3.LoadRawString to get the data from the cache as a string.
All the best,
Joel
Re: Hitting 1MB PlayerPrefs limit on webgl
I’m getting the playerprefs memory exception in all the browsers I’ve tried, so very happy to try the cache:
I’m good with using the cache object once it’s populated, but how do I populate the cache from a string (Json contents of the ES3 save-file)
Thanks for the fast response!
Regards,
I’m good with using the cache object once it’s populated, but how do I populate the cache from a string (Json contents of the ES3 save-file)
Thanks for the fast response!
Regards,
Re: Hitting 1MB PlayerPrefs limit on webgl
Hi there,
You do this using ES3.SaveRaw with the Cache save location enabled.
All the best,
Joel
You do this using ES3.SaveRaw with the Cache save location enabled.
All the best,
Joel
Re: Hitting 1MB PlayerPrefs limit on webgl
I will try that again, just tried it but must not have set sync to file properly as it was still erroring.
Re: Hitting 1MB PlayerPrefs limit on webgl
Setting location to cache and using saveraw and loadraw worked perfectly, thank you (and way faster than playerprefs performance-wise)!