Question by
SRomoM · May 18, 2017 at 02:22 PM ·
androidassetbundlevuforia
Android Vuforia dosen't download the asset bundle form a server
Hello, I'm getting problem with downloading Asset bundles on an android device from a Linux server.In Unity Player everything works properly but when I pass the project on Android, always show me this error:
and this is the code where im downloading the asset :
IEnumerator DownloadAndCache(string url)
{
while (!Caching.ready)
yield return null;
using (WWW www = WWW.LoadFromCacheOrDownload("file://"+url, 1))
{
yield return www;
if (www.error != null)
throw new UnityException("WWW Download had an error: " + www.error);
AssetBundle bundle = www.assetBundle;
if (bundle.mainAsset == null)
{
gamOb = Instantiate(renderGameObject((GameObject)bundle.LoadAsset(bundle.GetAllAssetNames()[0])));
}
else
Instantiate(bundle.mainAsset);
bundle.Unload(false);
}
}
and the server where is getting the assets is an Linux one. I don't know if that is relevant since in Unity player work perfectly.
errorunity.png
(61.8 kB)
Comment