移动平台各种路劲总结

string loadPath = "file:///" + Application.persistentDataPath + "/" + info.path + djResPostfix;
            WWW www = new WWW(loadPath);
            yield return www;


            if(www.error == null && www.assetBundle.mainAsset != null)
            {
                Debug.Log("end _loadResByPath" + loadPath);
            }
            oneResLoadInfo.resObj = www.assetBundle.mainAsset;
            oneResLoadInfo.isLoadEnd = true;


            www.assetBundle.Unload(false);

            www = null;


Andriod和Ios平台读取persistentDataPath目录


#if UNITY_EDITOR
        string filepath ="file:///" + Application.streamingAssetsPath + "/AngerHeroIcon/" + ID + ".png";
#elif UNITY_IPHONE
 string filepath = "file:///" + Application.streamingAssetsPath+"/AngerHeroIcon/" + ID + ".png";
#elif UNITY_ANDROID
 string filepath = Application.streamingAssetsPath+"/AngerHeroIcon/" + ID + ".png";
#endif

Andriod和Ios平台读取streamingAssetsPath 目录


你可能感兴趣的:(U3D)