- Home /
PlayerPrefs to store a huge binary on mobile iOS Android
Is it possible to use PlayerPrefs to store a large image on mobile? Are there maximums for PlayerPrefs for mobile, and are these max constraints consistent across devices?
there appears no easy way to organize subheadings in unity answers.. right answer is also based on OP's platform - the other link seems to be non-mobile
the other question is about playerprefs limitations, which should state mobile platform limitations as well. now I'm not following where you want to get at...
Answer by whydoidoit · May 28, 2012 at 09:50 AM
CORRECTION
There is only a limit on the WebPlayer (of 1MB), otherwise you are fine.
You can also store data in a file in the Application.persistentDataPath location on the device....
well im saving 200 mb of images as string converted from byte array. It doesnt give any problem on iphone 3g or 4g or 4gs. Even i was looking for the limit and i couldnt find any in unity docs. One known restriction is 1mb in web player, other than that i dont see any restriction. Even there is, 200 mb seems to be pretty big enough to care about, isnt it.
Actually there is no limit for PlayerPrefs except in the webplayer where it's limited to 1$$anonymous$$B. You can use PlayerPrefs, but it depends on the platform. Afaik on iOS Unity also uses a binary file like in a webbuild (but without restrictions). Strings are stored as UTF8 as far as i can tell, so binary data as string would be bigger than storing real binary data, In the worst case 2-3 times bigger
@bunny83 ofc it was bigger, but i didnt want to manage it with my own file handling system, so went for playerprefs it slef.
Your answer
Follow this Question
Related Questions
PlayerPrefs Storage Location on Android or iOS 4 Answers
Is it okay to store many player preferences for mobile? 1 Answer
Is it possible to send SMS from an action in Unity? (Mobile iOS or Android) 1 Answer
getPressure for touch pressure on Android or iOS 3 Answers
Android/iOS notifications when the game is not running 1 Answer