Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

How to Get a PlayerPrefsX boolean?

$
0
0
Hey everybody, I'm not particularly sure how to reference booleans that have and have not been created, yet, through playerPrefsX. I wrote for the boolean to save, but I did it while using variables, to create a unique name. So my boolean script looks like this: PlayerPrefsX.SetBool(thisLevel + "TimeBadge", true); That works fine and dandy, but how do I reference it in the current script or others? For Example: I want to make an if statement that determines whether or not that boolean is true. What would I type? I have fruitlessly tried this: if(PlayerPrefsX.GetBool(LVLnameTimeBadge){ } and some other failed experiments. Let me know if you would like to read those. Also, I believe I need some type of for loop to help the system understand what to look for, because the playerprefsx booleans that don't exist yet (the false ones), can't load the technically false booleans. (makes sense, because they aren't made until the BadgeBool achievement is unlocked) Links / tips / tricks / etc all appreciated!

Viewing all articles
Browse latest Browse all 1333

Trending Articles