Search Unity

Suggestion: improved asset bundle workflow

Discussion in 'Asset Bundles' started by kavalri_patrik, Mar 5, 2021.

  1. kavalri_patrik


    Dec 18, 2020
    I would like to suggest that the following changes be made regarding asset bundles:

    • All assets must be assigned to an asset bundle before they can be used anywhere in the project. Assets should not even get imported by Unity if they are not assigned to a bundle.
    • The project view shows the asset bundle layout instead of physical directory layout by default, but can be toggled to show directory layout. A bundle simply appears as a folder in the new project view. (like in the asset bundle browser plugin). All assets that have yet to be assigned to a bundle is shown under a separate "Unassigned" folder.
    • The little bundle assignment dropdown at the bottom of the inspector is removed completely. Bundles are now created from the project view. Assets are assigned to bundles by drag & drop.
    • The editor automatically builds asset bundles and includes them in the built player by default.
    • By default, assets that are completely unreferenced will be excluded from bundles during build. This may mean that some bundles become empty, such bundles are completely ignored during the build process.
    • A bundle can be flagged as manual, which means that Unity will not automatically build or load the bundle. The developer then has to make sure that the bundle is built and included in the player. Unreferenced assets will not be excluded from manual bundles, as it's assumed they will be loaded dynamically. The folders representing a manual bundle in the project view have a different color to differentiate them from automatic bundles.
    • And lastly, assets can be assigned to multiple bundles. Assets that are assigned to multiple bundles should have a special icon or color, so that you can see that it is being (intentionally) duplicated.

    This design should be completely backwards-compatible. All currently existing asset bundles would simply become manual bundles in the new system.

    This design has the following benefits:
    • Project management == asset bundle management, i.e. you get asset bundles for free simply by organising your project. You don't even need to be aware of what an asset bundle is, and when you do find out what they are you can start using them immediately, because your assets are already prepared.
    • Assets no longer have to be auto-included into bundles that reference them, because all used assets are assigned to a bundle by design. This completely eliminates the problem of asset duplication.
    • It just makes sense.
    Thank you!