Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: DennisJensen on March 23, 2017, 12:29:00 PM
-
Hi,
I'm struggling a bit with XML. I would like to load some data about the player, and that works fine. I then through scripts add XP for example and a player level, in the end I would like to save the data again to XML file, so I use Xml Set Node Properties which seems to work since it doesn't give me a error and the debug mode shows the right values, but when I then exits play mode the data is reset. Do I need to run a action after I set the properties? I don't use a Proxy xml.
-
Okay I spend the evening trying to solve this problem and I found a solutions through some of the tutorials. So from what I could figure out you need to save your XML file as a playerprefs string and then you pull that next time you use your xml file.
I guess the reason is that Unity is only able to save player prefs? Would be nice if somebody could confirm that, it seems like a long work around.
Cheers
/Dennis
-
Hi,
yes, playerPref is the only place where Unity can store data on the device at runtime easily and as a built in solution.
Bye,
Jean
-
Okay, thank you.