Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

New assetbundle system in Unity 5

Discussion in 'Editor & General Support' started by perlohmann, Mar 18, 2015.

  1. perlohmann

    perlohmann

    Joined:
    Feb 12, 2009
    Posts:
    221
    Hi,

    I have looked into the new asset bundle system of Unity 5 and found some issues that I would like clarification on.

    First of all we do assetbundles in a way where we split our objects into smaller parts in order to reuse and reduce the amount of data required for users to download from the server. This means that from a single catalog can easily consist of 20k-30k asset bundles (depending on the size of the project) and when placeing that many files inside the asset folder (we used to do this in unity 2.x) makes Unity slower than it has to be (not only are we adding 30k files to the product structure, but unity is also generating an equal amount of meta files due to svn support).
    1. Are there any way to place the assetbundles outside the assets folder?
    2. With the new building method then which asset will become the main asset (the docs does not explain this)?
    3. How long will the two bundle methods coexist?
    4. What about mixing version of Unity and assetbundles in Unity 5? so will asset bundles from a previous version work with a later player?
    5. Does the web/standalone build target for assetbundles also work for the WebGL platform?

    The system we have manages dependencies where we need it or build the entire assets in other places where we dont need to split things into oblivion. Redoing our assetbundle pipeline would be a major task. The best thing with the new system as I see it is the way to batch build bundles, but everything else..... well lets see.

    //perlohmann
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi,

    1: Why do you have your AssetBundles in the Assets folder?

    2: There is no main asset. You don't really need that concept any more.

    3: For a few minor revisions (5.x)

    4: Yes if you build an AssetBundle using Unity 5, the same asset bundle can be used with a later player*

    5: Yes

    The new asset bundle system will manage all the dependencies for you and enable incremental build so the entire dependency chain does not have to be rebuild when you modify assets or AssetBundles. So it might take some time to redo your system, but you will get that time back because of the reduced build time when iterating.

    * For some consoles this is not true for performance reasons or if you explicitly build your AssetBundles with the DisableWriteTypeTree build option to reduce size and load time at the cost of compatibility.
     
  3. perlohmann

    perlohmann

    Joined:
    Feb 12, 2009
    Posts:
    221
    Hi Steen,

    Thank you for your feedback. I do have some follow ups on your answers.
    1. We dont and we would like it to stay that way. But from what I have read the new unity 5 approach will save the asset bundles to a sub folder under the main Assets folder. Is this correct or am I mistaken?
    2. So you plan on deprecate the main asset variable for the Assetbundle. That is sad news and that means we would also have to touch that side of the content loading as well.
    3. Ok.
    4. Ok. Do you have any numbers on how much (space I assume) you save by building them with DisableWriteTypeTree?
    5. Excellent at least there are some good news here.
    I do not think that we would get too much time back afterwards due to the way we use Unity. We do not work with full projects (our project would be very very large due to the 3D content we have). so we only checkout partial projects. This might not matter too much but we do delete and reload projects on a yearly basis (and in this case it would be a standard project with a custom set of 3D assets). Also we split materials into the shader and material settings and the individual textures at runtime just before building them into assetbundles.

    So everything can be solved I guess but converting to the new approach as I see it right now is something that will take months of development and testing to be sure the pipeline is running smooth. Not so good news =(

    All in all it looks like we will need to invest a massive amount of time to upgrade our pipeline to the Unity 5 approach once the old approach is no longer be supported (or better yet before that).

    //perlohmann
     
  4. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Unity 5.0 and up use the new AssetBundle systhem. Your 4.6.4 does not.