USED to exist. I have the settings.xml file included in the Assets/Resources folder, so it should be copying. After not getting it to work, I uninstalled the app from my phone and reinstalled from scratch. That directory no longer gets created.
Any way I try, I either get an “access denied” or “part of the path does not exist” at the point of creating the FileStream with the path.
I’ve tested almost the same today. It seems Unity doesn’t use
/Android/data/com.mycompany.myapp/files
for the persistant path.
The actual path that is used is
/data/data/com.mycompany.myapp/files
This path seems to work for me to save and load files, however i’m not able to find this path “manually” in one of my file browser apps.
It seems it’s located somewhere in the internal memory so it belongs to the security sandbox of your app. So your app can access this folder, but you can’t modify the files from outside your app.
Probably with root access you can access this directory, but i don’t have a “rooted” tablet available
I’ve found that the path android uses depends on the build settings. If you check development build or set player settings > android > configuration > write access = external sd card then the axternal mnt/android/data path is used. If internal only is selected and development build isn’t checked then data/data/ path is used.
that’s what I’ve found any way. I’ve also found that you don’t see changes in the sdcard while the phone is connected, or atleast when the app is running. Had to reconnect to see changes.
You can get your Android apps internal path directly from Unity without a plugin, even with permission WRITE_EXTERNAL_STORAGE. Similar code can be used to get any other path.
I spent 2 days on this :P. First I made my own Java plugin, but as I do not like to extend my current Activity or Application I ran into problems. Finally I pieced together how to do it directly from Unity with the following code:
I don’t have a problem seeing the files on the internal storage. The problem is that on uninstall the data is gone. So it’s not persistent enough for me. /mnt/extSdCard instead. The camelcase is important.