using UnityEngine; using System.Collections; using System.Xml; public class Test : MonoBehaviour { public string filePath = string.Empty; public string fileName = "/ss.xml"; public string name,level; void Start(){ WriteXML (); ReadXml (); } 写数据 public void WriteXML(){ filePath = Application.dataPath; filePath = filePath + fileName; XmlDocument doc = new XmlDocument (); doc.Load (filePath); XmlNode rootNode = doc.SelectSingleNode ("root"); XmlElement equipEle = doc.CreateElement ("Equip"); XmlElement nameEle = doc.CreateElement (" |