Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: JOY on December 01, 2016, 04:41:07 AM
-
Hi,
I'm new with PlayMaker and would like to achieve this:
I have a FSM to define the rules to generate the maps in my game. It works correctly but I'd like to update it online/remotely (without submit new builds to App Store). I think about XML/JSON online import but don't know how to do it.
Could you please guide me?
Thanks,
Anh
-
Well... To download XML content all you have to do is something like this
This is my version to do something I need to do so it might be slightly different.
public IEnumerator DownloadAndSaveXML(int difficulty) {
string urlXML = "url/elsapp/Difficulty_" + difficulty + ".xml";
WWW www = new WWW (urlXML);
yield return www;
if (www.error != null) {
Debug.Log ("Error Downloading XML");
} else if (www.isDone) {
Do something with www.text (this is the content from xml)
You can put it in a string or perhaps create an xml file, put it there and save it in persistence datapath.
}
}
I'm using code to do this rather than Playmaker, not sure why it just seem quicker for me to write this. But to use Playmaker to do this I think it's pretty much similar to the WWW action. and then www.text is the content
-
Hi,
you can also give a it a try with xmlMaker ( on the Ecosystem)
Bye,
Jean
-
Hi @jeanfabre,
Did you mean this one? https://hutonggames.fogbugz.com/default.asp?W1133
Thanks,
Anh
-
Hi,
yes, updated the page for the json package.
Bye,
Jean