I am trying to read an assetbundle from internal storage. This works:
void Start()
{
var myLoadedAssetBundle = AssetBundle.LoadFromFile(Application.persistentDataPath + "/AssetBundles/model_objs");
if (myLoadedAssetBundle == null)
{
Debug.Log("Failed to load AssetBundle!");
return;
}
GameObject wheel = (GameObject)myLoadedAssetBundle.LoadAsset("01_obj");
Instantiate(wheel);
}
However when I try to redirect it to root, like so:
void Start()
{
var myLoadedAssetBundle = AssetBundle.LoadFromFile("/storage/emulated/0/AssetBundles/model_objs");
if (myLoadedAssetBundle == null)
{
Debug.Log("Failed to load AssetBundle!");
return;
}
GameObject wheel = (GameObject)myLoadedAssetBundle.LoadAsset("01_obj");
Instantiate(wheel);
}
I get a Unable to open archive file: /storage/emulated/0/AssetBundles/model_objs
on a logcat
The bundle is exactly the same and is in both locations