|
Hey there everyone, I was just wondering how big PlayerPrefs can be for my using, and the maximum amount of variables I can store into it. Perhaps just an example of it's limitations? I'm curious because I plan on having it check for a lot of things - presumably over 50 - for level items, character stats, etc. and I guess I'm just a little cautious on how to spare them. Are they the only way to retain Game states and what not? And should I be okay with using them like crazy, or will they be a little too cost effective by doing so? Thanks for anyone willing to lend a hand, Jordan.
(comments are locked)
|
|
Read the docs ;) http://unity3d.com/support/documentation/ScriptReference/PlayerPrefs.html Basically there are no hard limits, with exception of WebPlayer, which is limited to a 1 MB. edit: To the second part of your question: No they are not the only way, but the easiest. You usually use them to store preferences, settings, highscores. If you want to save a level's current state, you better write your own Serialization/Deserialization Methods. But that's a bigger topic, so just google for "Serialization C#" for tutorials and explainations Thanks! Now is there any benefits to using the Serialization/Deserialization methods oppose to just doing the stats and such in PlayerPrefs?
Nov 04 '11 at 05:49 PM
Xatoku
how about working with iphone / android? it doesn't seem to work at all! http://answers.unity3d.com/questions/139856/iphone-playerprefs.html
Aug 20 '12 at 09:58 PM
Cawas
i would just like to share with you an asset i came accross a while ago by a regualr answerer DontDoIt (i think) its a save component which makes saving really easy and its free, i havent used it yet but the videos ive seen makes saving a simple click of a button
Aug 20 '12 at 10:06 PM
reptilebeats
actually it whydoidoit http://forum.unity3d.com/threads/138678-Unity-Save-Game-Level-Serialization
Aug 20 '12 at 10:06 PM
reptilebeats
i was just reading up on player pref performance or speed and came accross a forum which said over 300 will be a bit slow on ios and android however this is from last year heres their solution http://www.previewlabs.com/writing-playerprefs-fast/ heres the page i found it on as well http://answers.unity3d.com/questions/17873/saveload-playerprefs.html
Aug 20 '12 at 10:15 PM
reptilebeats
(comments are locked)
|
