Unity3d 在不同设备中的文件读写 的路径
2013-08-05 12:01
239 查看
Application.dataPath : 数据路径
Unity Editor: <path tp project folder>/AssetsUnity 编辑器:<工程文件夹的路径>/Assets
Mac player: <path to player app bundle>/Contents
Mac播放器:<到播放器应用的路径>/Contents
iPhone player: <path
to player app bundle>/<AppName.app>/Data
iPhone播放器:<到播放器应用的路径>/<AppName.app>/Data
Win player: <path to executablename_Data folder>
Win播放器:< 包含可执行播发器的文件夹的路径>\Data
Dashboard widget: <path to the dashboard widget bundle>
Dasboard窗口:< dashboard widget bundle的路径>
Web player: The absolute url to the player data file folder (without
the actual data file name)
网络播放器:到播放器数据文件夹的绝对路径(没有实际的数据文件名称)
在IOS真机设备中 需要在<path to player app bundle>/Documents路径下才可以读写。
unity3d中通过如下操作获取Document文件路径
public
string Path
{
get{
string path=null;
if(Application.platform==RuntimePlatform.IPhonePlayer)
{
path=
Application.dataPath.Substring (0, Application.dataPath.Length - 5);
path
= path.Substring(0, path.LastIndexOf('/'))+"/Documents/";
}
else
{
path=Application.dataPath+"/Resource/GameData/";
}
return
path;
}
}
相关文章推荐
- Unity3d 在不同设备中的文件读写 的路径
- Unity3d 在不同设备中的文件读写 的路径
- Unity3D-各平台文件读写操作路径目录
- Unity不同路径下的文件拷贝
- Linux内核中读写文件/设备的实现方法
- rails文件路径 文件读写及发布
- c# winform 路径选择和文件读写
- 对android默认存储路径中文件的读写
- 《懒人Shell脚本》之十——统计多重路径下的不同扩展名文件及个数
- 例说linux内核与应用数据通信(三):读写内核设备驱动文件
- ORACLE 10g将数据文件,日志文件和控制文件迁移到不同的路径
- iscsi target存储技术-多路径 udev动态管理设备文件方法 nfs
- jquery在不同浏览器获取文件路径出现问题!
- applicationContext.xml文件放置位置不同而导致的jUnit测试的时候路径的不同
- 如何读取Java项目不同路径的配置文件
- Windows无法访问指定设备,路径或文件.您可能没有合适的权限访问这个项目
- java读写properties文件,解决系统找不到指定路径,解决写入后读取正常,但文件数据未更新问题
- linux块设备读写流程(一篇很难的块设备文件 没怎么看懂)
- unity不同平台下访问游戏中文件的路径
- 写5个不同的自己的函数,来截取一个全路径的文件的扩展名,允许封装php库中已有的函数。