public void InitXMLRoot() { curNodeIndx = 0; curTextIndx = 0; System.Text.StringBuilder pathString = new System.Text.StringBuilder(); pathString.Append(XML_NAME); pathString.Append(XML_EXT); TextAsset xml = (TextAsset)Resources.Load(XML_NAME); xmlRoot = AdvRoot.ParseXML(xml.text); curNode = xmlRoot.nodes[curNodeIndx]; curNode.nodes.AddRange(xmlRoot.nodes); // Locally load xml file //xmlRoot = AdvRoot.Load(System.IO.Path.Combine(Application.streamingAssetsPath, pathString.ToString())); }
private void Start() { root = new AdvRoot(); root.nodes = new AdvNode[5]; StartNode(); Node1(); Node2(); Node3(); EndNode(); if (saveInResources) { root.Save(Path.Combine(Application.dataPath + "/Resources/", "astarisAdventure.xml")); } if (saveLocal) { root.Save(Path.Combine(Application.dataPath + "/AstarisAdventure/StreamingASsets/", "astarisAdventure.xml")); } }