Unity3D简单读取XML内容代码.docxVIP

  • 0
  • 0
  • 约小于1千字
  • 约 3页
  • 2019-07-14 发布于湖北
  • 举报
Unity3D简单读取XML内容代码 Posted on 2013年04月10日 by U3d / \o 查看 Unity3D脚本/插件 中的全部文章 Unity3D脚本/插件/被围观 188 次 一个简单读取Unity3D中XML内容的代码: public string showXml(string temp) { UnityEditor.AssetDatabase.Refresh(); string filepath = Application.dataPath + /my.xml; string tempText = ; print(a); print(File.Exists(filepath).ToString()); if (File.Exists(filepath)) { print(b); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(filepath);//若要读网络 前面改成IEnum线程这里改网络xml地址即可 XmlNodeList nodeList = xmlDoc.SelectSingleNode(main).ChildNodes; // foreach (XmlElement xe in nodeList) { // Debug.Log(xe.GetAttribute(name)); //

文档评论(0)

1亿VIP精品文档

相关文档