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

Feedback Addresables 2.0

Discussion in 'Addressables' started by JesOb, Jun 14, 2020.

  1. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Please make addressables to work as AssemblyDefinition so we can just define AssetBundleDefinition files inside project directory structure and Unity then collect assets in corresponding Bundles on build.
    • All settings of bundle collection will be in BundleDefinitionFile
    • By default treat that Assets folder contains root AssetBundleDefinition file and all assets will go there. Entire project can be one AssetBundle this will work good for small projects or on start.
    • There will be no place for duplicates because every asset will be part of some bundle by default
    • To prevent packing unused asset into bundles just use idea of Root like in GC. So every AssetBundleDefinition will have some root assets that will act as start point to collect assets and asset dependencies for bundle.
    • Assets in packages can be in [package-name] bundle by default
    And please make core of AssetManagement separate of Addressables package and develop Addressables on top of it.
    See https://forum.unity.com/threads/universal-assets-management.912044/
     
    Last edited: Jun 17, 2020
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    Flagging this for the team to check out!
     
    JesOb likes this.
  3. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Thanks a lot :)

    It will be very good to have some clarification on future of Addressables and AssetManagement in unity. So we will know what tools to start develop if Unity plans dont have resolution of our asset related issues in near future :)
     
  4. CameronND

    CameronND

    Joined:
    Oct 2, 2018
    Posts:
    88
    These are good ideas, I like it.
    I agree that Unity should make the editor integration easier, your suggestions are nice.
     
  5. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    350
    Makes sense. Adding assets to addressables should feel more natural and deeply integrated into how Editor works. Also agree that Addressables should be split into 2 separate packages. The ResourceManager for example and everything surrounding it, can be moved into the Core package. This way people (or UT itself) could author an alternative, easier to use Addressables-lite package that will still use the same underlying systems and build mechanics, but have easier API (with sync methods etc.).
     
    JesOb likes this.
  6. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    It will be good to have some feedback from Unity Addressables Team about idea and future of Addressables itself :)
     
  7. Redtail87

    Redtail87

    Joined:
    Jul 17, 2013
    Posts:
    125
    This is actually how I currently use Addressables. Built a system using ScriptableObjects that you place in the folder you want to be a bundle. Works very well and if for some reason the settings bug out you can regenerate the addressable groups with a click.

    Its a commercial project so I unfortunately can't share how I did it, but it isn't too hard to implement.
     
    phobos2077 and JesOb like this.
  8. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Cool :)

    How you deal with assets in folder that dont need to be part of bundle?
     
  9. Redtail87

    Redtail87

    Joined:
    Jul 17, 2013
    Posts:
    125
    I organize my folders around the bundles.

    Something like this:

    -Systems
    ----Player
    --------Scripts
    --------Assets
    ------------Shared
    -----------------BundleData.asset
    ------------Local
     
  10. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    OK
    So you clear your folders with assets manually when there is assets that no more used in project, am I right?
     
  11. Redtail87

    Redtail87

    Joined:
    Jul 17, 2013
    Posts:
    125
    I'm not sure what you are asking, sorry.

    If there is an asset that is no longer required for the project, it will get deleted (but retained in the git history).

    If you want to move something from being built directly into the application to be built into bundles instead, you move those assets from the Local to the Shared folder and do a fresh build of the application and the bundles.

    Hope that clarifies
     
  12. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    There are 2 type of issues with asset management in Unity for all times:
    1. Remove assets from build that actually dont used in project
    2. Remove duplicate assets from bundles

    First one was automatically handled by Unity if it not in bundles but for bundles we need to manage it manually for now. How do you manage it?

    Second one was manual work for all times and as I understand your setup somewhat resolve it if you know tahs every asset use from within bundle lie inside some another bundle.
     
  13. Redtail87

    Redtail87

    Joined:
    Jul 17, 2013
    Posts:
    125
    Ah I see,

    It is done manually, any asset in a folder with the ScriptableObject is included.
    So if we have say, an asset pack that has 100 objects but we only use 50, all 100 are included unfortunately.

    and for duplicate assets, you are right, since we don't nest the ScriptableObjects, there usually are not duplicate refs, unless the assets pull in dependencies.