Quantcast
Channel: Questions in topic: "assetbundle"
Viewing all articles
Browse latest Browse all 1593

[Asset Bundle] unable to download from server

$
0
0
I am trying to download asset bundle from dropbox and its showing error when it download the file it shows an error as - "NullReferenceException: Object reference not set to an instance of an object". And storing the object of AssetBundle in my own object.like this - IEnumerator LoadAsset () { using (WWW www = WWW.LoadFromCacheOrDownload ("https://www.dropbox.com/s/64geijvud5cuci5/MGame?dl=0",1)) { if (www.error != null) throw new UnityException ("WWW download had an error:" + www.error); if (www.assetBundle != null) { myAssetBundle = www.assetBundle.LoadAsset("myGame"); } www.assetBundle.Unload (false); } yield return null; } And when I click on error it shows error on "www.assetbundle.Unload(false)" this line. This is how I am instantiating my object after downloading IEnumerator InstantiateLoadedAsset (Object objectName) { var g = Instantiate (objectName, Vector3.zero, Quaternion.identity) as GameObject; yield return null; } can anybody tell me whats wrong with my code

Viewing all articles
Browse latest Browse all 1593

Trending Articles



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