`
longerdewo
  • 浏览: 29818 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

对应平台下【streamingAssetsPath 】【dataPath 】【persistentDataPath 】的路径

 
阅读更多
string streamingAssetsPath = Application.streamingAssetsPath;
string dataPath = Application.dataPath;
string persistentDataPath = Application.persistentDataPath;
Debug.Log ("streamingAssetsPath= "+streamingAssetsPath+
"_dataPath= "+dataPath+
" _persistentDataPath="+persistentDataPath);

 对于android平台下与电脑上测试的结果:

//android真机测试:
streamingAssetsPath = jar:file:///mnt/asec/com.test.longshao-2/pkg.apk!/assets
                 _dataPath = /mnt/asec/com.test.longshao-2/pkg.apk
_persistentDataPath =/data/data/com.test.longshao/files

 

persistentDataPathandroid平台可指定路径为sdCard中,需要配置过程:

File->Build Settings->Player Settings ->Inspector->Other Settings ->Write Access ->External(SDCard)

设置成功后真机测试路径为:

  _persistentDataPath =/mnt/sdcard/Android/data/com.test.longshao/files


//电脑测试:
streamingAssetsPath = D:/unity_workspace/example/example_UI/Assets/StreamingAssets
                 _dataPath = D:/unity_workspace/example/example_UI/Assets
_persistentDataPath = C:/Users/longshao/AppData/LocalLow/DefaultCompany/example_UI

0
6
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics