移動平臺各種路勁總結

damenhanter發表於2016-06-27
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 目錄


相關文章