Search Unity

Can't get assetbundles working

Discussion in 'Asset Bundles' started by Kaven01, Feb 12, 2018.

  1. Kaven01


    Nov 22, 2017
    Hello. I am making iOS game and I am required to use app thinning (slicing), so that we could give lowres textures to weaker devices without including also hires. I have read that this is done by asset bundle variants, so I tried to use asset bundles. I am fighting with it for a week without success.

    - I read everything I could about the topic (not that there is too much info), I understand how bundles work and how bundle variants work.
    - I downloaded Asset bundle manager demo. I can understand what AssetBundleManager does. I am able to build bundles and bundle variants - in the demo, and also in my own project.
    - But then I cannot make it run - either demo or my project. It works in simulation mode, that does not use bundles at all.

    I first tried to build demo for windows (where I am developing). I successfully built bundles through Assets/AssetBundles/Build Assetbundles and verified that they were really created as files in AssetBundles folder. Then I built app and run ... and it ended in the first loading scene. As far as I can tell, required asset bundles were not loaded. Ok, it was clearly because AssetBundleServer.exe was not running. I tried to start it from Assets menu , but it ends with error. I tried to run it from commandline (with correct directory path and PID) - server was successfully launched, but game did not work either.

    Ok, there may be some problem with the server. So I tried to build the game for iOS. As I understand it, on iOS the bundles should be packed with app thanks to CollectResources() magic. After build, I found that bundles are contained in UnityData.xcassets of XCode project, which I found promissing. But when launched on iPad, app did the same - nothing, just stuck in the loading scene. I did some debugging and found that AssetBundleManager is never initialized, because iOS manifest bundle is never loaded.

    I am out of ideas. What should I do to make at least official asset bundle manager demo working?