As I understand it there is a limit to the size of the playerprefs file for the iPhone which I believe to me 1 MB. Is this the same for the iPad?
Also can the unity editor send it’s playerprefs file to a device when you build.
I seem to be running out of space on an iPad, even though the iPhone game copes fine with it.
Thanks
PlayerPrefs are represented on the device through NSUserDefaults so whatever applies to them does so for all devices.
but if you have one of 1MB you did something totally wrong like missusing it for gamesave which is a horrible idea as NSUserDefaults are loaded with your application and remain permanentely in RAM!
And no, the prefs remain where they are generated
All it stores is the name of the level and whether it’s unlocked, locked and how many stars each level has. On the iPhone it holds well over 100 levels with no problems but when vie tried to put it onto an iPad it only show 5 levels unless I reset the level data at which point it shows all the levels.
Is there a way to check the size of the file on the device?
The 1MB limit is for webplayers only, which doesn’t apply to the iPhone.
–Eric
As mentioned, it works through NSUserDefaults (an iOS feature), not some file stuff
if it stops working after 5 and alike its likely an issue with your code though
I had thought that and double checked the code with the lite version (which works fine) and can not find any difference. I managed to resolve it once by wiping the playerprefs data and that seems to have worked so far, although I am trying to get it to do it again so will keep you updated if it does.
Thanks
sounds like you potentially had some errorous code that totally poised it
I’ll have to agree. Spent all day looking through the code but couldn’t find anything wrong so in the end removed everything related to the iPad and it works again. Just have to work through and add it back a bit at a time and see if it happens again.