嗚嗚喔學習筆記: 八月 2018

搜尋此網誌

2018年8月29日 星期三

Unity 各平台路徑位置

Application.dataPath
建議視窗開發中用的路徑:
windows:  /Assets
IPone: Application/???/Name.app/Data
Android: /data/app/Name.apk
Application.persistentDataPath
Contains the path to a persistent data directory (Read Only).
平台中的公開目錄,文件持久性的保存不會因為應用程式更新或升級而刪除
windows:  C:/Users/xxxx/AppData/LocalLow/CompanyName/ProductName
IPone: Application/???/Documents
Android: /data/data/Name/files
Application.streamingAssetsPath
專案目錄下面的 Assets/StreamingAssets
windows:   /Assets/StreamingAssets
IPone: Application/???/Name.app/Data/Raw
Android: jar:file:///data/app/Name.apk/!/assets
Application.temporaryCachePath
Contains the path to a temporary data / cache directory (Read Only).
平台的快取儲存路徑
windows: C:/Users/xxxx/AppData/Local/Temp/CompanyName/ProductName
IPone: Application/???/Library/Caches
Android:  /data/data/Name/cache

參考: http://zxxcc0001.pixnet.net/blog/post/243195373-unity---%E5%90%84%E5%B9%B3%E5%8F%B0%E6%AA%94%E6%A1%88%E8%B7%AF%E5%BE%91