1、路径含义
属性名称 | 含义 |
---|---|
Application.dataPath | 数据路径(只读) |
Application.streamingAssetsPath | 流数据路径(只读) |
Application.persistentDataPath | 持久数据路径(读写) |
Application.temporaryCachePath | 临时数据路径(只读) |
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 | 系统指定目录1/工程名 |
Application.temporaryCachePath | 系统指定目录1/工程名 |
网友评论