How to load an AssetBundle from sdcard

I am trying to load an asset bundle from my external storage (sdcard). On regular android it is easy

Environment.getExternalDirector().getPath() + file.extendsion

I cant seem to find where the external directory is with unity. I have tired



and everything in between.

I am trying to load my asset bundles with this code
AssetBundle bundle = AssetBundle.CreateFromFile(“file:///sdcard/animals.unity3d”); but it keeps saying

Failed to open file at path: file:///sdcard/animals.unity3d or whichever string i use for the file. I am getting really frustrated with this,and I cannot find any answers here that actually work.

I have found the answer. I was trying to open with Create from file but if you use www.LoadfromCachOrDownload(“file://sdcard/filename.ext”) it will load it up without any delay.
Although I am not sure if it will work on all android devices so if anyone has a better way please post it.

AssetBundle is platform specific . While exporting AssetBundle make sure that its exported for Android platform.

Then that Example.unity3d file on SDCard and just attach following C# code snip. to empty GameObject.

example URL of file on Android device SD-card

string bundleURL = “file:///mnt/sdcard/AndroidCube.unity3d”;

C# Script:

void Start() {  


	// Update is called once per frame
	IEnumerator DownloadAndCache() {

			yield return null;
		// example URL of file on PC filesystem (Windows)
		// string bundleURL = "file:///D:/Unity/AssetBundles/MyAssetBundle.unity3d";
		// example URL of file on Android device SD-card
		string bundleURL = "file:///mnt/sdcard/AndroidCube.unity3d";
		using (WWW www = WWW .LoadFromCacheOrDownload(bundleURL, Version)) {
			yield return www;
			if (www .error != null)
				throw new UnityException("WWW Download had an error: " + www .error);

			// Load and retrieve the AssetBundle
			AssetBundle bundle = www .assetBundle;

Ten do whatever you want do with that assets.
Imp: make sure in Manifest permission for ReadExternalSDcard is there