Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Asset Bundles work flow questions.

Discussion in 'Editor & General Support' started by Lord_Meshadieme, Nov 27, 2014.

  1. Lord_Meshadieme

    Lord_Meshadieme

    Joined:
    Oct 30, 2014
    Posts:
    6
    I've been working with a project to be streamed through webplayer using multiple assets bundles, currently I decided to build them using the scenes function. Now heres what i am thinking here.

    Build Asset Bundles - > Build Web Player ???? (How does it know which assets will loaded dynamically? Do i delete them from the project??) -> DownloadCacheAssetBundles

    Another question i have is with larger asset bundles, where exactly does the 50 MB limit hit it, in the download? memory? cache? loaded assets? because some of our levels are huge, like 700MB huge.

    Just trying to get my head around this process.

    Thanks for any help.
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    The 50MB limit is on the decompressed bundles which get written into the cache. You can purchase a larger cache limit by contacting our Sales team.

    The documentation for asset bundles is pretty good.
     
  3. Lord_Meshadieme

    Lord_Meshadieme

    Joined:
    Oct 30, 2014
    Posts:
    6
    I've scoured the documentation and all other sources, nothing clarifies my query. Here's another way i can explain my question.
     
  4. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Build assets bundles, using the assets you want written into them. Then remove the assets from the scene/project so Unity doesn't know about them. Your script code is then responsible for loading the assets from the bundles when you need to. Make your final build as normal. In your example, the compiled web player will not have files 4 and 5.
     
  5. Lord_Meshadieme

    Lord_Meshadieme

    Joined:
    Oct 30, 2014
    Posts:
    6
    Thanks, see the manual never mentions we should be manually removing the bundled assets from the project. Iwas thinking maybe there was somewhere we tell unity that "look these are the bundles we will import at runtime, so don't compile them". Should be worth mentioning in the manuals.
     
  6. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Well, the assets don't need to be removed from the project. But if the build process finds the assets, perhaps referenced from a scene, then it'll assume that the asset should be added into the build. Often what happens is teams get close to the end of the development, and decide they want to use asset bundles. Scripts and scene reference the assets, and removing them is then complex.
     
    GameDevBryant likes this.