Unity中的Path对应各平台中的Path
2016-05-11 13:24
387 查看
最近使用Unity读取各个平台路径,特别对移动平台路径的处理
简直是各种蛋疼 各种坑
在此与大家分享下
IOS:
Application.dataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data
Application.streamingAssetsPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data/Raw
Application.persistentDataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Documents
Application.temporaryCachePath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Library/Caches
Android:
Application.dataPath : /data/app/xxx.xxx.xxx.apk
Application.streamingAssetsPath : jar:file:///data/app/xxx.xxx.xxx.apk/!/assets
Application.persistentDataPath : /data/data/xxx.xxx.xxx/files
Application.temporaryCachePath : /data/data/xxx.xxx.xxx/cache
Windows Web Player:
Application.dataPath : file:///D:/MyGame/WebPlayer (即导包后保存的文件夹,html文件所在文件夹)
Application.streamingAssetsPath :
Application.persistentDataPath :
Application.temporaryCachePath :
注意:
Application.persistentDataPath 才是移动端可用的保存生成文件的地方
放到resource中打包后不可以更改了
放到Application .dataPath中移动端是没有访问权限的
===================================================
如何查看iPhone文件存放目录?首先需要越狱,越狱后打开iPhone手机目录,找到/Applications目录下就是iPhone所有软件目录。
iPhone文件目录介绍
1、/Applications
常用软件的安装目录。
2. /private ar/ mobile/Media /iphone video Recorder
iphone video Recorder录像文件存放目录。
3. /private ar/ mobile/Media /DCIM
相机拍摄的照片文件存放目录。
4、/privatear/ mobile /Media/iTunes_Control/Music
iTunes上传的多媒体文件(例如MP3、MP4等)存放目录,文件没有被修改,但是文件名字被修改了,直接下载到电脑即可读取。
5、/private ar/root/Media/EBooks
熊猫看书存放目录。
6、/Library/Ringtones
系统自带的来电铃声存放目录。
7、/System/Library/Audio/UISounds
短信记其它系统默认效果铃声(m4r铃声文件改扩展名为.caf)短信铃声文件名为sms-received开头的caf文件。
8、/privatear/ mobile /Library/AddressBook
系统电话本的存放目录。
9、/privatear/mobile/Library/SMS
短信存放目录
9、/private ar/ mobile/Media /iphone Recorder
iPhone Recorder录音软件文件存放目录
10、/Applications/Preferences.app/zh_CN.lproj
软件Preferences.app的中文汉化文件存放目录
11、/Library/Wallpaper
系统q1ang纸的存放目录
12、/System/Library/Audio/UISounds
系统声音文件的存放目录
13、/privatear/root/Media/PXL
ibrickr上传安装程序建立的一个数据库,估计和windows的uninstall记录差不多。
14、/bin
和linux系统差不多,是系统执行指令的存放目录。
15、/privatear/ mobile /Library/SMS
系统短信的存放目录
16、/privatear/run
系统进程运行的临时目录?(查看这里可以看到系统启动的所有进程)
17、/privatear/logs/CrashReporter
系统错误记录报。
简直是各种蛋疼 各种坑
在此与大家分享下
IOS:
Application.dataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data
Application.streamingAssetsPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data/Raw
Application.persistentDataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Documents
Application.temporaryCachePath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Library/Caches
Android:
Application.dataPath : /data/app/xxx.xxx.xxx.apk
Application.streamingAssetsPath : jar:file:///data/app/xxx.xxx.xxx.apk/!/assets
Application.persistentDataPath : /data/data/xxx.xxx.xxx/files
Application.temporaryCachePath : /data/data/xxx.xxx.xxx/cache
Windows Web Player:
Application.dataPath : file:///D:/MyGame/WebPlayer (即导包后保存的文件夹,html文件所在文件夹)
Application.streamingAssetsPath :
Application.persistentDataPath :
Application.temporaryCachePath :
注意:
Application.persistentDataPath 才是移动端可用的保存生成文件的地方
放到resource中打包后不可以更改了
放到Application .dataPath中移动端是没有访问权限的
===================================================
如何查看iPhone文件存放目录?首先需要越狱,越狱后打开iPhone手机目录,找到/Applications目录下就是iPhone所有软件目录。
iPhone文件目录介绍
1、/Applications
常用软件的安装目录。
2. /private ar/ mobile/Media /iphone video Recorder
iphone video Recorder录像文件存放目录。
3. /private ar/ mobile/Media /DCIM
相机拍摄的照片文件存放目录。
4、/privatear/ mobile /Media/iTunes_Control/Music
iTunes上传的多媒体文件(例如MP3、MP4等)存放目录,文件没有被修改,但是文件名字被修改了,直接下载到电脑即可读取。
5、/private ar/root/Media/EBooks
熊猫看书存放目录。
6、/Library/Ringtones
系统自带的来电铃声存放目录。
7、/System/Library/Audio/UISounds
短信记其它系统默认效果铃声(m4r铃声文件改扩展名为.caf)短信铃声文件名为sms-received开头的caf文件。
8、/privatear/ mobile /Library/AddressBook
系统电话本的存放目录。
9、/privatear/mobile/Library/SMS
短信存放目录
9、/private ar/ mobile/Media /iphone Recorder
iPhone Recorder录音软件文件存放目录
10、/Applications/Preferences.app/zh_CN.lproj
软件Preferences.app的中文汉化文件存放目录
11、/Library/Wallpaper
系统q1ang纸的存放目录
12、/System/Library/Audio/UISounds
系统声音文件的存放目录
13、/privatear/root/Media/PXL
ibrickr上传安装程序建立的一个数据库,估计和windows的uninstall记录差不多。
14、/bin
和linux系统差不多,是系统执行指令的存放目录。
15、/privatear/ mobile /Library/SMS
系统短信的存放目录
16、/privatear/run
系统进程运行的临时目录?(查看这里可以看到系统启动的所有进程)
17、/privatear/logs/CrashReporter
系统错误记录报。
相关文章推荐
- unity 在移动平台中,文件操作路径详解
- 浅谈unity3d中使用MVC框架模式
- Android Studio 2.1 和 Unity3D 5.3.4 交互(二)
- Unity3D中uGUI事件系统简述及使用方法总结
- Unity3.X 笔记01
- 旋转角色
- Unity3d Realtime Dynamic Clouds Rendering
- Unity Shaders and Effects Cookbook (7-1) 在Surface Shader 中 访问 顶点颜色
- unity 的内存管理
- unity+Cardboard SDK VR开发Cardboard Unity SDK讲解
- unity+Cardboard SDK VR开发教程
- 一个unity 牛的博客网址
- Unity打包Android备忘
- <Unity-UGUI>使用Mask, 正确的裁减非默认材质UI对象
- Unity Shader学习1——简述
- Unity 关于unity中的update、Lateupdate和FixedUpdate。
- Unity Raycast 光线投射
- Unity3D射线检测控制转向
- WMware 10 Ubuntu 12.04 进入Unity模式
- Unity3D寻路导航NavMesh——自动寻路过吊桥