I’ve been using parseInt and parseFloat a bit while reading player pref strings back in to my scene, but I can’t seem to get the same thing to work with booleans.
I can’t seem to find the right function for that but I’m sure there must be something similar to the others, parseBool doesn’t work.
Anyone know what the function im looking for is? So far I’ve just worked around it by using integers of 0 to 1, but visually it’d be nicer to have the checkboxes
System.Boolean.Parse(). Or TryParse, in case the input string might not equal TrueString or FalseString. For reading/writing booleans in PlayerPrefs, use BoolPrefs.
Hey Eric,
That’s more like what I was looking for!
BoolPrefs looks cool too, but I am reading a big string that has all kinds of types so I’ll stick with this for now.
Thanks Again!
Pete.