- Home /
Question by
raj231 · Jan 30, 2015 at 10:06 AM ·
androidgameobjectassetbundle
AssetBundle loading model is not showing in mobile
I'm loading 3d model from server url and using assetbundle but when i load the model in unityeditor it's working fine and the 3d model of cube is displaying proper. But when i load the model in android mobile the model is not displaying in the screen.
IEnumerator GetAssetBundle() {
string bundleURL = url;
Debug.Log (bundleURL);
using (WWW www = WWW .LoadFromCacheOrDownload(bundleURL, Version)) {
yield return www;
Debug.Log (Version);
if (www .error != null)
throw new UnityException("WWW Download had an error: " + www .error);
AssetBundle bundle = www .assetBundle;
if (AssetName == "") {
Debug.Log ("null");
mBundleInstance = Instantiate (bundle.mainAsset) as GameObject;
mBundleInstance.transform.parent = imageTarget.transform;
mBundleInstance.transform.localPosition = new Vector3(0,0,0);
}
else {
Debug.Log ("not null");
mBundleInstance = Instantiate(bundle.Load (AssetName)) as GameObject;
}
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613181948im_/https://answers.unity.com/themes/thub/images/avi.jpg)