-
-
On a desktop computer (Mac OS or Windows) the location of the files can be obtained with the following code:
path = Application.dataPath + "/StreamingAssets";
-
On iOS, you should use:
path = Application.dataPath + "/Raw";
-
On Android, you should use:
path = "jar:file://" + Application.dataPath + "!/assets/";
发现在IOS上用 string filepath = Application.dataPath +"/Raw/test.xml";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(filepath);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(filepath);
也可以加载xml文件。