Unity3D 资源路径

来源:互联网 发布:生产看板软件 编辑:程序博客网 时间:2024/05/18 06:38

  • 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);
    也可以加载xml文件。 
0 0
原创粉丝点击