Unity中的Path对应各平台中的Path

来源:互联网 发布:哈登15 16赛季数据 编辑:程序博客网 时间:2024/03/28 19:18

最近使用unity读取各个平台路径,特别对移动平台路径的处理
简直是各种蛋疼 各种坑
在此与大家分享下

IOS:Application.dataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/DataApplication.streamingAssetsPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data/RawApplication.persistentDataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/DocumentsApplication.temporaryCachePath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Library/Caches
android:Application.dataPath : /data/app/xxx.xxx.xxx.apkApplication.streamingAssetsPath : jar:file:///data/app/xxx.xxx.xxx.apk/!/assetsApplication.persistentDataPath : /data/data/xxx.xxx.xxx/filesApplication.temporaryCachePath : /data/data/xxx.xxx.xxx/cache
Windows Web Player:Application.dataPath : file:///D:/MyGame/ (即导包后保存的文件夹,html文件所在文件夹)Application.streamingAssetsPath :Application.persistentDataPath :Application.temporaryCachePath : 

注意:
Application.persistentDataPath 才是移动端可用的保存生成文件的地方
放到resource中打包后不可以更改了
放到Application .dataPath中移动端是没有访问权限的

0 0
原创粉丝点击