Quantcast
Channel: Questions in topic: "unitywebplayer"
Viewing all articles
Browse latest Browse all 452

Web build: WWW downloads correctly, but www.assetBundle is Null

$
0
0
* I have a bundle of about 10 .bytes files. * I follow the Unity WWW example. * I get www.isDone=true, and www.bytesDownloaded is the correct size, so it downloads something. * www.assetBundle is always null. * I use Dropbox Public folder as Server. * I get no error messages. void Start() { StartCoroutine(LoadBundle()); } IEnumerator LoadBundle() { string downloadPath = FilePath.Url() + FilePath.Dir + DataLib.AssetBundlesDir + FilePath.Dir + "mainbundle"; using (WWW www = new WWW(downloadPath)) { yield return www; if (www.error != null) throw new Exception("WWW download had an error:" + www.error); AssetBundle bundle = www.assetBundle; Debug.Log("wwwResult: is done: " + www.isDone.ToString() + ", progress: " + www.progress.ToString() + ", bytesDownloaded: " + www.bytesDownloaded.ToString()); // www.isDone is true //www.bytesDownloaded are correct //but www.assetBundle is Null } }

Viewing all articles
Browse latest Browse all 452

Trending Articles



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