Is it possible to manually edit the player prefs in the property list editor? It seems when I add keys and hit save that the next time I open it these additions have been reset.
Is there an explanation somewhere of how the Player prefs .plist file works exactly ie not the unity commands specifically but rather when it gets saved, how keys should be added etc ect
Oh right, I had a look but I can’t find where exactly to edit within unity. Are the playerprefs accessed by some kind of unique object or something?
Where is the ‘input editor’?
Sorry, but its the first time I’ve messed with player prefs so its all a bit new.
Cheers
The player prefs itself are never overwritten unless you did so. Although I’m not sure if the game mode in the editor actually alters them permanentely.
What I mentioned though about manually messing with them when the editor is running still holds. As the editor will likely overwrite them again (it holds an internal state of them while it runs I think), only mess with them manually while the editor isn’t active
You at best test if they work in a build (web or stand alone)
Also, ensure that if you are on windows, that you have admin rights and didn’t install unity to program files on c if its vista and you didn’t disable UAC
It seems that there are quite a few people confused with playerprefs on the forums. I will continue to research but at the moment I’m thinking it might be easier and quicker just to save my data in a read/writable text file somehow.
The idea that player prefs is a quick easy way of storing variables between sessions seems to have gotton lost somewhere in development. Imagine if we could just have a game object that we could flag ‘Dont DestroyOnShutDown’. That would be all we needed. Simples.
I’ve noticed that if I delete all the keys in my file it deletes the file too…what’s that all about?
Urrgh…any idea how I can get my player prefs file back…? Ive tried restarting Unity, creating a build but nothing…the file isnt there any more…this is a laugh. :lol:
Well when I had no file in existance i did a build and run which creted the file again with all the vars Yey!
However, I then added another variable in script and tried rebuilding again but the prefs file remains as it was. No matter what I try I cant seem to add any more variables
I tried clearing the file and adding again but I just keep getting the smae old variables and from the file modification time it looks like it wasnt updated. Blimey, this is really confusing.
I noticed there is a player prefs tutorial availbale but I dont fancy paying $15 for it
Can anyone help?