[Android - Data save issues] Does the 'install location' determine the location of persistentDataPath?


We’re having issues where players lose a portion of their data but not all of it. We suspect that it has to do with the location on disk for persistentDataPath, maybe Unity is reporting an path with older data for some reason and so the game loads from that.

I was looking at the build options and saw settings for “Install location” and “Write access”. My questions are:

  • How does the install location and persisetentDataPath play together? does the install location affect the persistentDataPath location on disk?
  • What does “Automatic” mean in the install location options? does it mean that Unity will try internal first and if it failed it tries external? (or vise versa)
  • How does “Write access” play with “install location”? If the game was installed internally, and write access was set to external, does that mean that the game won’t be able to save to internal storage? (or vise versa)
  • Do I need to add any special manifest permissions values? (we already have ‘WRITE_EXTERNAL_STORAGE’)
  • Which is more reliable, to use internal or external write in the build options?

Any clarification on the subject, pointers, dos and donts, or tips on the proper/right way to deal with this would be much appreciated.



[EDIT]: Second answer here says that internal storage is intended for development only. and that users need to have their device rooted to be able to access it. Do both of these statements still hold true now?


Man we’re working on a big project with a custom Android launcher. All Android apps work like a charm as they all get installed in app/data… Unity apps however were a Royal pain in the arsch. Check the ADB output of installed packages. The last one is the Unity APK with standard settings.


Output after we set the install location to: Force (?!) Internal


Took 8 hours to solve it trying to edit the AndroidManifest, adjusting laucher code… i’m not an expert but why put it on Prefer External?