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 在移动平台中,文件操作路径详解》

 

posted @ 2017-08-07 09:30  沙溪河边青青草  阅读(407)  评论(0编辑  收藏  举报