一、常用的路径:
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:UsersusernameAppDataLocalTempcompany nameproduct name
Application.persistentDataPath: C:UsersusernameAppDataLocalLowcompany nameproduct 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 在移动平台中,文件操作路径详解》