惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
量子位
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
爱范儿
爱范儿
博客园 - 【当耐特】
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
博客园 - 叶小钗
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
B
Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
V
V2EX

博客园 - facewater

Error: Permission denied @ apply2files Error: Cannot find module 'internal/fs' pecl install imagick CentOS 7.0系统安装配置LAMP服务器(Apache+PHP+MariaDB) ionic hybrid备忘 pod 出错备忘 kwm备忘 mysql用shell建100多字段表并导入 mac下python实现vmstat 架设laravel 桌面oracle 11g导入多年库的dump备忘 Linux64位服务器编译安装MySQL5.6(CentOS6.4) 64位Linux下编译搭建Nginx1.5与PHP5.5(CentOS6.4) linux 环境变量 yii2高级应用 android 九宫加密记事本 EZGUI下的动态图片的处理 Unity3D]引擎崩溃、异常、警告、BUG与提示总结及解决方法 u3d动态加入模型
Unity3d 在不同设备中的文件读写 的路径
facewater · 2013-11-02 · via 博客园 - facewater

Application.dataPath : 数据路径

Unity Editor: <path tp project folder>/Assets

Unity 编辑器:<工程文件夹的路径>/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;
        }     
    }