Unity pit resource loading mechanism www

Running on different platforms, the different load paths www, protocol type, there are differences!

Load resources in unity Editor mode or under Apple (ios):

String path = @ " File: /// " + Application.streamingAssetsPath + " / " + " full filename " ; // must add @ 'File: /// " 
the WWW the WWW = new new the WWW (path);

Loading resources on the Android platform:

Application.streamingAssetsPath Android platform in default to have " JAR: File: /// " prefix, can be loaded directly using www
String path = Application.streamingAssetsPath + " / " + " full file name " ;
WWW www = new WWW(path);

 

 

Guess you like

Origin www.cnblogs.com/RainPaint/p/11097855.html