unity3d开发需要知道的一些常量
android下测试结果:
Application.persistentDataPath:
非调试模式下得出的路径名:
/data/data/com.xxx.xxx/files
在调试模式下(即打开Development Build)得出的路径名:
/mnt/sdcard/Android/data/com.xxx.xxx/files
这个关键在于一个设置,就是player setting中的write access。打开后,应用程序才有权限写到sdcard中。这个时候Application.persistentDataPath始终是/sdcard/Android/data/com.xxx.xxx/files,www的缓存地址在/sdcard/Android/data/下面。
Write Access | When set to External (SDCard), will enable write access to external storage such as the SD-Card. Automatically enabled for development builds. |
Application.dataPath:/mnt/asec/com.xxx.xxx-2/pkg.apk
com.xxx.xxx是导出项目时设置的Bundle Identifier