Search Unity

Are asset bundles suitable for large projects?

Discussion in 'Asset Bundles' started by RakNet, Dec 9, 2019.

  1. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    I have a large game that takes up too much memory to fit all at once. I have no need to download assets but I need to not have all assets for the entire game in memory at once. Is asset bundles the right approach for this? The part I don't understand from testing is it seems like I need to rebuild the asset bundle when the assets change? If so, how would my team be able to work if they need to wait an hour after every change to a prefab?
     
  2. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    It's pretty much necessary for large projects. Unity resource files have a 4GB file limit, so if you don't use bundles that's your game's maximum size.

    Also, from what you said about your testing, I assume you tried cresting a single bundle with everything in it, is that right? That's not how you use asset bundles: not only you'll have to rebuild the entire bundle, you'll still be subject to the same 4GB limit. The ideal workflow is to split your content into multiple bundles, so Unity will only build the ones which contain changed assets. Of course, this means you'll have to manage asset bundle loading/unloading. Addressables can help you with that. UT markets it as an AB replacement, but it's actually built on top of asset bundles: it's pretty much an asset bundle manager with nice editor integration.
     
    phobos2077 likes this.
  3. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
  4. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Unity Team.