Hello,
i have a App in Stores made with Unity 4.x.
@ the start of the App i copy some files from Streaming Assets to Application.persistentDataPath…
works fine and i can access the files from my computer and for example change a file and Unity loads the file fine…
All went smooth no crash etc… everybody can access the file on sd-card …/storage/sdcard1/my-ID/files…
Now if i build with Unity 5.2.x i can not find my files anymore on SD-Card…
If i do a clean install on my Android i can not find the folder com.xxx.Xx/files/…
Also Application.persistentDataPath gives now a different path… like data/data/emulatedStorage0/etc…
Sry but what did i miss in the change from 4 to 5 ???
Something fundamental changed and WHY?
Since the last week i try to read a file from SD-Card on Android… with Unity 4.x no Problem with Unity 5.x i can’t get it to work…
Is this a bug?
How do i access a file that is on the root of a SD-Card ?
here is a code to find the right sd-card name… but if i have the path Unity don’t want to load something from SD-Card…
public string GetExternalFilePath(){
if (Directory.Exists("/storage/extSdCard")) return "/storage/extSdCard";
if (Directory.Exists("/storage/sdcard1")) return "/storage/sdcard1";
if (Directory.Exists("/storage/usbcard1")) return "storage/usbcard1";
if (Directory.Exists("/storage/sdcard0")) return "/storage/sdcard0";
return Application.persistentDataPath;
}
Example:
file:///storage/sdcard1/image.png doesn’t work… path is fine but Unity is not able to load…
can anyone bring a bit light in? Should i go with Unity4 like many other do?
Also lot’s of devices are dropped with Unity 5.x… don’t understand why
Will Android development dropped sometime soon in Unity 5 ??? Like Blackberry and Windows Phone 8 etc…
btw. not lot activity around Android here… why?
hope someone can help… !
many thx for taking the time…
M.
P.S. did not change my Manifest or anything…
So i have setup in Player:
Install Location: prefer external
Write access: External SD-Card
and in Mainfex i have this:
here this is how it looks with Unity 5.x.x no files to see!