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. Dismiss Notice

Packing Folder entires added to Addressables Group Separately

Discussion in 'Addressables' started by ferretnt, Oct 2, 2021.

  1. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    405
    We have hundreds of large assets (they're actually 16k-square textures) stored in a folder hierarchy. We'd like to be able to have each in a separate assetbundle so we can download them on demand from addressables, packed separately (because they're enormous.)

    It would be great if rather than adding all of those Texture2Ds to an asset group, we could just add the root folder and have all Texture2Ds (or assets in general) in that folder added as a separate bundle. However, that's not the behaviour of adding folders to addressables - folders will get all entries into their folder packed into a single bundle, which is not a good idea in this case.

    Is there a way to add a folder and have the assets within it added as if they were separate assets when the addressables group is marked "pack separately"? That would seem more logical (after all, if you wanted the assets packed together, you probably wouldn't add the folder to an addressables group marked "pack separately."

    The last work on this thread in Oct 2019 says "We are looking into some options". I couldn't find anything more recent. Is there a way to do this?

    https://forum.unity.com/threads/related-addressable-asset-packing.571399/
     
  2. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    405
    Request no longer necessary. Abandoned addressables for the case of storing large volumes of updatable content with simple, fixed schemas. Even if this issue were fixed, addressables is still horrible for that.
     
  3. zacharyyates

    zacharyyates

    Joined:
    Jan 5, 2020
    Posts:
    4
    @ferretnt Did you end up serializing the data yourself? If you wouldn't mind sharing a little about your implementation, it might help me. I'm in the same boat - the addressables workflow isn't a great fit for this use case.
     
  4. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    405
    Not a lot to share. Write your own AssetBundle build system using SBP. Host the resulting bundles. Download and Load them using UnityWebRequest. Look at the API surface of everything Addressables does that you need and implement that, which is probably between 0.1% and 1% of addressables.

    I'd love to understand the process that lead to Addressables. It's theoretically a great system, but in practice it attempts to support every possible large scale content build and update workflow, and the result is un-debuggable and unscriptable for anything except the simplest Unity Learn demo.