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

Error while downloading Asset Bundle: Failed to decompress data for the AssetBundle

$
0
0
[This is the asset bundle][1]. It's just a rock from [Free Rocks][2]. Doesn't matter what asset bundle I try to make or where I host it, I always get the same error message, which suggests that I must be doing something wrong. Please help, thank you. My code: using System.Collections; using System.Collections.Generic; using System.Net; using UnityEditor; using UnityEngine; using UnityEngine.Networking; public class main : MonoBehaviour { public string bundleUrl; public string assetName; void Start() { StartCoroutine(GetAssetBundle(bundleUrl)); } // Update is called once per frame void Update() { } IEnumerator GetAssetBundle(string bundleUrl) { UnityWebRequest www = UnityWebRequestAssetBundle.GetAssetBundle(bundleUrl); yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { Debug.Log(www.error); } else { AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(www); GameObject prefab = bundle.LoadAsset(assetName); Instantiate(prefab); } } } the editor: [https://imgur.com/a/9MbDxgu][3] I tried with .unity3d extension and without it. [1]: https://down.uploadfiles.io/get/0o1r5 [2]: https://assetstore.unity.com/packages/3d/environments/landscapes/free-rocks-19288 [3]: https://imgur.com/a/9MbDxgu

Viewing all articles
Browse latest Browse all 1593

Trending Articles



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