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

Issue #1 on hold
Former user created an issue

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)

  1. philmzo NA

    I'm the author of the previous report. I thought I was logged-in. I can send real URI through PM when you reply

  2. philmzo NA

    Here's my process to build asset bundle: Capture.PNG where Loader path = test, Bundle template = bundle_*.unity3d, bundle builder has nothing checked, Exporter path = testt

  3. Juan Legaz

    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()

  4. philmzo NA

    Thanks Juan. Unfortunately, it doesn't work: print(bundle.GetAllAssetNames()); throws an error because bundle cannot be decompressed.

  5. Sam Narain

    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.

  6. Hiroki Omae
    • changed milestone to 1.2
    • marked as task
    • edited description

    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.

  7. Hiroki Omae

    I am changing status of this issue on hold until AssetBundle team have some good progress on designing good ResourceManager.

  8. Log in to comment