- Home /
What is the string length of a string on PlayerPrefs?
Hi nerd people!
I need to store some serious data on a Key value on player prefs. But I don't know if the string property is large enough... where can I find info about that?
Thanks a lot!
Answer by MD_Reptile · Apr 24, 2014 at 01:10 AM
Not sure if this is a definite answer for you, but according to these guys its very high in c# in general, not exactly related to unity's blend of C#.
http://bytes.com/topic/c-sharp/answers/535852-maximum-length-string
I had thought maybe you could store 1 million characters or more in a string, but to quote Mike in the comments below:
Player prefs are stored in the registry on Windows and the max size of a registry value if 1mb
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724872(v=vs.85).aspx
On mac they're stored in a property list but I dont know much about them...
The web player stores player prefs as a binary file, but there is a 1mb limit to their file size.
So there is a limitation in the player prefs themselves! I am sorry I cannot give you an exact number, if someones sure of that information please comment below.
Player prefs are stored in the registry on Windows and the max size of a registry value if 1mb
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724872(v=vs.85).aspx
On mac they're stored in a property list but I dont know much about them...
The web player stores player prefs as a binary file, but there is a 1mb limit to their file size.
Great! I think I can work with that! Thanks man! (or girl, who knows?) =)
I'll change the answer to reflect this $$anonymous$$ike!
Your answer
