Quantcast
Viewing all articles
Browse latest Browse all 312

Loading a 3D object from Assetbundle mutliple times in different scenes

I have an AssetBundle for a 3d object. In Vuforia, when one Image target is detected I want it to load the scene that will show me the downloaded 3d object. This works for me if I run the script once.But when I go back to the camera view and again detect the image target,I am not able to get the object. How do I make it in such a way that the object is loaded and displayed everytime the image target is detected without re-starting the app. This is my code: AssetBundle bundle; void Start() { StartCoroutine("Download"); } IEnumerator Download() { url="http://myurl"; WWW myasset= WWW.LoadFromCacheorDownload(url,1); yield return asset; bundle = myasset.assetBundle if(Assetname=="Box") { bundle.LoadAsync(Assetname,typeof((GameObject)); Instantiate(bundle.Load(AssetName)); } }

Viewing all articles
Browse latest Browse all 312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>