Search Unity

How to load an AssetBundleManifest in the Editor?

Discussion in 'Scripting' started by cory_munky, Aug 4, 2015.

  1. cory_munky

    cory_munky

    Joined:
    Dec 10, 2014
    Posts:
    66
    The editor can create an bunch of bundles -including one that contains the AssetBundleManifest. But, because the editor can't use coroutines, the asset bundle loading API seems to be carefully crafted to prevent the editor from reading the manifest it just created.

    The problem is that
    1. The bundle containing the manifest is compressed.
    2. Unity's system for decompressing bundles only works asynchronously through coroutines.
    3. The editor does not support working asynchronously through coroutines.

    WWW or AssetBundle.CreateFromMemory can decompress the bundle, but won't work in the editor. AssetBundle.CreateFromFile or CreateFromMemoryImmediate will work in the editor, but can't decompress the bundle.

    So, now what?