Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void soundLoad()
- {
- bool asd = true;
- if (Application.platform == RuntimePlatform.Android)
- {
- string oriPath = System.IO.Path.Combine(Application.streamingAssetsPath, "soundSave.xml");
- WWW reader = new WWW(oriPath);
- while (!reader.isDone) { Debug.Log("not"); }
- Debug.Log("und www");
- StreamReader sr = new StreamReader(reader.text);
- XmlDocument doc = new XmlDocument();
- doc.Load(sr);
- Debug.Log("und sr");
- XmlNodeList adds = doc.GetElementsByTagName("sound");
- foreach (XmlNode add in adds)
- if (add.Attributes["music"].Name == "music")
- {
- musicSlider.value = float.Parse(add.Attributes["music"].Value);
- soundSlider.value = float.Parse(add.Attributes["sound"].Value);
- break;
- }
- //doc.Save(filepath);
- Debug.Log(musicSlider.value + " | " + soundSlider.value);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement