Hi all, I have written a caching system which handles getting assets from our webserver and storing them on the local device. Then later when the same asset is required, it checks the local data cache first, and returns the asset if found, otherwise it downloads it and stores it. This is working pretty great for all asset types on all platforms (PC, Mac, Web, IOS), except Android.
On Android I am using Application.dataPath and the device is saying it is unable to access this location. I will admit we have not tested Android for some time since this was first implemented and a few Unity and Android versions have come and gone in between. Am I using the right location still, or has this changed?
Any help appreciated, thanks!
Ian
The application itself is write protected.
you might want to use the .persistantData path or explicitely use the SD (favorable normally).
there are some threads on the matter I think even including working code 
if you want to cache asset bundles, the easist and most performant way is WWW.LoadFromCacheOrDownload 
Hey Dreamora,
Thanks for the reply! I did see another thread but his path was to the SD card and I was wondering what would happen if the phone doesn’t have an SD card (granted almost all do, but) is there a way to handle/check that?
The path I am trying to create is “/data/app/Documents” with “Documents” being our designated storage area. Also yes I do use LoadFromCacheOrDownload as well.
I will give .persistantDataPath a go too.
Cheers!
Ian
if its not present, it normally will throw an exception, think a path not found exception in this case.
but yeah most will have it installed cause all on HTC are doomed without it as <= 80mb as on the HTC Desire makes it a do or die thing where its worse enough taht application cores must be on the flash storage