Unity各种目录总结

一.www

a.Editor:

   new WWW(Application.streamingAssetsPath + "/...") 或
   new WWW("file://" + Application.streamingAssetsPath + "/...")

  都可以;

  也可以加载其他目录的文件,如:new WWW(Application.dataPath+ "/Test/...") 

b.Windows:

  new WWW("file://" + Application.streamingAssetsPath + "/...");

 

c.Android:

   new WWW(Application.streamingAssetsPath + "/...");

 

d.IOS:

  new WWW("file://" + Application.streamingAssetsPath + "/...");

 

e.Mac:

  new WWW("file://" + Application.streamingAssetsPath + "/...");(没测试)

 

二.AssetBundle.LoadFromFile

a.Editor / Android / IOS / Windows / Mac

AssetBundle.LoadFromFile(Application.streamingAssetsPath + "/...");

posted on 2019-01-23 16:31  sun2000  阅读(222)  评论(0)    收藏  举报