Search Unity

(Case 1131047) Pack Separately does not work for addressable folder

Discussion in 'Addressables' started by MNNoxMortem, Feb 25, 2019.

  1. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    upload_2019-2-25_16-17-49.png
    The prefabs in the folder are actual not packed separately but all together.
     
    andreiagmu likes this.
  2. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    I'm having the same issue.
    I'm using Unity 2021.3.19f1, Addressables v1.21.2

    In my case, I have an Addressable group with only a single folder marked as addressable (I was also planning to have groups containing multiple addressable folders).
    I'd expect that when setting up the group's Bundle Mode to "Pack Separately", it would generate asset bundles for each and every asset inside that folder.
    But it only generates a single asset bundle for that entire folder.

    Does "Pack Separately" only work for the "first-level addressables" in the group? (i.e.: The actual addressable folders)
    Could an option be added to make that operation recursive? So it generates asset bundles for every asset inside those addressable folders.

    @MNNoxMortem What was Unity's answer to your bug report? Did they fix it in some other version of Addressables?
     
  3. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    I just filed a new bug report regarding this issue. :)
     
  4. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    I recently discovered that this behavior is a feature of Addressables, not a bug.

    From the Addressables documentation:
    https://docs.unity3d.com/Packages/c...or/groups/ContentPackingAndLoadingSchema.html

    Bundle Mode:
    - Pack Separately: create a bundle for each primary asset in the group. Subassets, such as Sprites in a Sprite sheet are packed together. Assets within a folder added to the group are also packed together.

    I still think that a setting to choose the packing behavior (pack together, or separately) for addressable folders would be most useful. This setting could be located on each addressable group, maybe (so it would apply to all addressable folders in that group). Ideally, it would be a setting configurable on each addressable folder in the group.


    Anyway, I found an alternative to achieve the desired behavior (pack folder sub-assets separately), using this importer by @Favo-Yang (thanks a lot for making this!)
    https://github.com/favoyang/unity-addressable-importer

    In my project, I use the following regex to search through all the assets inside a folder, then automatically add those assets separately (one by one) in an addressable group, without adding any folders to the group (to avoid duplicate stuff in the resulting bundles).

    ^<folder path>/.*\..*$

    As an example, if you wanted to search inside the folder "Assets/Art/Third Party/Mixamo/Mixamo Animations":

    ^Assets/Art/Third Party/Mixamo/Mixamo Animations/.*\..*$

    Check the attached image for a usage example with Favo-Yang's addressable importer.


    By the way, in my workflow, I first use the method and importer described above to automatically (and quickly) populate my addressable groups with all my relevant folders' assets.
    Then, I use an AnalyzeRule to automatically detect and delete any unused addressable entries in my game (by scanning all of my game's built scenes), for maximum build size savings.

    Check the following post for more details about this:
    https://forum.unity.com/threads/detect-unused-addressables-feature-request.996016/#post-8825473
     

    Attached Files:

    Last edited: Feb 22, 2023
  5. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    andreiagmu likes this.