- Home /
Access internal Storage
How can I access internal storage through unity. I want to be able to download an asset package, transfer it to internal storage and then have unity access it to use it. I keep seeing how you use sd card storage but not internal.
Answer by whydoidoit · Jul 10, 2012 at 06:57 PM
Use System.IO and Application.persistentDataPath as a location to store information in a device independent way.
so Application.persistentDataPath is the location of my internal storage datafolder??
Yes that's right - it is different on some platforms but that is where you are allowed to write files.
I have found a weird thing. Application.persistantDataPath is the location of both the internalStorage and External storage depending on which permissions you have on android. If you have permissions to write to external it will write to external and will not touch internal. I just don't know why that is. Also some System.IO function calls (eg File.writeAllBytes()) do not exist for me.
There's something weird with some of those io functions, they seem to exist and then not. Probably to do with which runtime you have selected.
Your answer
Follow this Question
Related Questions
Is it possible to access a file from the android Internal storage on to a Unity app during run time? 0 Answers
Where is the persistent data path on my Android phone? 3 Answers
Android App stopped asking permission for internal storage 0 Answers
Writing to SD card on Android 0 Answers
How to load an AssetBundle from sdcard 2 Answers