Unity3D - 系统路径

一、常用的路径:

  1、Application.dataPath        //游戏数据存放的路径。

  2、Application.streamingAssetsPath    //流数据的缓存,StreamingAssets资源文件夹路径

  3、Application.persistentDataPath       //持久化数据存储目录的路径

  4、Application.temporaryCachePath   /临时数据的缓存目录


 

二、在各个平台的具体路径
  1、Windows:

    Application.dataPath:              appname_Data/ 

  Application.streamingAssetsPath:   appname_Data/StreamingAssets 

  Application.temporaryCachePath:   C:\Users\username\AppData\Local\Temp\company name\product name 

  Application.persistentDataPath:     C:\Users\username\AppData\LocalLow\company name\product name

  2、IOS:

  Application.dataPath:                /var/containers/Bundle/Application/app sandbox/appname.app/Data

  Application.streamingAssetsPath:   /var/containers/Bundle/Application/app sandbox/appname.app/Data/Raw 

  Application.temporaryCachePath:   /var/mobile/Containers/Data/Application/app sandbox/Library/Caches 

  Application.persistentDataPath:     /var/mobile/Containers/Data/Application/app sandbox/Documents

  3、Android:

  Application.dataPath:               /data/app/package name/appname.apk 

  Application.streamingAssetsPath:   jar:file:///data/app/package name-1/appname.apk!/assets 

  Application.temporaryCachePath:   /storage/emulated/0/Android/data/package name/cache 

  Application.persistentDataPath:     /storage/emulated/0/Android/data/package name/files


 

参考:

1、http://www.cnblogs.com/hehe001/p/6156451.html  《Unity3D各平台Application.xxxPath的路径》

2、http://www.manew.com/thread-23491-1-1.html  《unity 在移动平台中,文件操作路径详解》

 

转载于:https://www.cnblogs.com/weigx/p/7286350.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值