Error while downloading Asset Bundle: Failed to decompress data for the AssetBundle ...
First of all thanks for this process to help develop the use of AssetBundle. It seems great.
Please, please, give me at least ONE fully working example for 5.4, from asset bundle creation to asset instantiation. I spend hours to make it work with no luck (and yes, I checked binary transfer in Filezilla):
UnityWebRequest www = UnityWebRequest.GetAssetBundle("http://**mywebsite.com**/Windows/bundle_0.unity3d", 0,0);
yield return www.Send();
if (www.isError)
{
Debug.Log(www.error);
}
else
{
// Show results as text
//Debug.Log(www.downloadHandler.text); // not working
// Or retrieve results as binary data
//byte[] results = www.downloadHandler.data; //not working
AssetBundle bundle = ((DownloadHandlerAssetBundle)www.downloadHandler).assetBundle; //or AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(www);?
Instantiate(bundle.mainAsset);
}
Comments (10)
-
-
Here's my process to build asset bundle: where Loader path = test, Bundle template = bundle_*.unity3d, bundle builder has nothing checked, Exporter path = testt
-
I believe the issue here is that the generated assetbundle doesn't have a mainAsset, you should try using "bundle.LoadAsset(nameOfTheAsset)", if you dont know what assets are inside the bundle you can list them with bundle.GetAllAssetNames()
-
Thanks Juan. Unfortunately, it doesn't work: print(bundle.GetAllAssetNames()); throws an error because bundle cannot be decompressed.
-
This issue does not relate to the ABGT tool, unless a corrupted AssetBundle is created - which I find hard to believe looking at your graph.
-
As far as I read this is more of issue to provide good working example, rather than actual bug or issue. You can find example in example branch with AssetBundleManager combined. On top of that, I am considering working on providing both "simpler" and "real scale" example.
-
- changed status to open
-
I am changing status of this issue on hold until AssetBundle team have some good progress on designing good ResourceManager.
-
- changed status to on hold
-
- removed milestone
- Log in to comment
I'm the author of the previous report. I thought I was logged-in. I can send real URI through PM when you reply