1、路徑含義
屬性名稱 | 含義 |
---|---|
Application.dataPath | 數(shù)據(jù)路徑(只讀) |
Application.streamingAssetsPath | 流數(shù)據(jù)路徑(只讀) |
Application.persistentDataPath | 持久數(shù)據(jù)路徑(讀寫) |
Application.temporaryCachePath | 臨時數(shù)據(jù)路徑(只讀) |
2、Android平臺
屬性名稱 | 返回路徑 |
---|---|
Application.dataPath | /data/app/xxx.xxx.xxx.apk |
Application.streamingAssetsPath | jar:file:///data/app/xxx.xxx.xxx.apk/!/assets |
Application.persistentDataPath | /data/data/xxx.xxx.xxx/files |
Application.temporaryCachePath | /data/data/xxx.xxx.xxx/cache |
3龄恋、IOS平臺
屬性名稱 | 返回路徑 |
---|---|
Application.dataPath | Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data |
Application.streamingAssetsPath | Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data/Raw |
Application.persistentDataPath | Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Documents |
Application.temporaryCachePath | Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Library/Caches |
4郭毕、Unity Editor平臺
屬性名稱 | 返回路徑 |
---|---|
Application.dataPath | Application(工程目錄)/Assets |
Application.streamingAssetsPath | Application(工程目錄)/Assets/StreamingAssets |
Application.persistentDataPath | 系統(tǒng)指定目錄1/工程名 |
Application.temporaryCachePath | 系統(tǒng)指定目錄1/工程名 |