- Home /
How to manually edit player prefs file on android ?
Hello, i have an old plugin that saves data to unity player prefs file, but since unity changed player prefs location i have to manually load & modify the old player prefs data.
i tried using xmlDocument, however, it behaves very weirdly.
Weird Behavior
xmlDocument changes only take place after closing the game
if i change or even delete the player prefs file , then let the plugin add its data to player prefs, the old deleted file suddenly re-appers as if it was not deleted
anyone have any idea why saving doesn't occur immediately ?
how does the removed file re-appears ? (does it have to do with the player prefs path being protected or something ?)
any other way to modify the player prefs file manually ?
(note: * i spent 2 days debugging this, i'm calling the xmlDocument.Save(), i tried using stream reader & writer & closing them but that didn't help,
the plugin isn't the cause if the issue, since it works correctly with older unity versions before unity changed player prefs path)
I don't know about your plugin, but just in case your are building for windows standalone: there is no player prefs file ... the values are stored in the registry (see here). This might be the root of your problems.
@saschandroid thanks for the note, however, i'm building for android ( i forgot to mention that)
Answer by jemonsuarez · Nov 23, 2016 at 01:24 PM
Hi @slake_it, as you asked me by email, I think firmly that FileManagement was the perfect alternative to your save system, so you don't need to worry about XML parsing no matter which platform you deploy. I hope it worked well in your peoject. Best regards.
Your answer
Follow this Question
Related Questions
How can I read an XML file in Android ? I can't access it 1 Answer
Unity 5: PlayerPrefs/Application data resets Graphics on Android device 0 Answers
Saving data 1 Answer
Problem loading xml in android 0 Answers
PlayerPrefs file wrong stored location 0 Answers