Unity3d 在不同设备中的文件读写 的路径
2013-03-20 15:16
274 查看
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-各平台文件读写操作路径目录
- 将数据文件恢复到不同的路径
- 第一个linux驱动_读写设备文件(2)
- ios获取文件路径的四种不同情况
- 搜索系统不同目录下相同名称的文件个数和具体路径
- 读写ini配置文件时的相对路径问题
- VMware 安装 Windows无法访问指定设备、路径或文件。你可能没有适当的权限访问该项目 拒绝访问
- winform展示Unity3D文件(支持动态改变文件路径)
- c++--------获取某个路径下所有文件的文件名,读写TXT文件到新的文件
- Unity3D 读写XML文件
- Unity3d 读写XML文件
- 《懒人Shell脚本》之十——统计多重路径下的不同扩展名文件及个数
- PHP不同目录下文件相互引用,相对路径填写。
- python读写不同编码txt文件
- Android 通过java代码实现修改指定路径文件的读写权限。
- 安卓文件读写二,对不同文件的处理要点
- Android用路径api在内部存储读写文件
- 在jsp和class文件中调用的相对路径不同。