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

相关文章:

  • 2021-05-12
  • 2022-12-23
  • 2021-10-31
  • 2021-09-13
  • 2022-12-23
  • 2021-12-25
  • 2021-11-06
猜你喜欢
  • 2021-04-02
  • 2022-12-23
  • 2021-11-19
  • 2021-09-07
  • 2021-07-16
  • 2021-08-06
相关资源
相似解决方案