Search Unity

Addressables that reference other object from other Addressables

Discussion in 'Addressables' started by bz_apps, Sep 21, 2020.

  1. bz_apps

    bz_apps

    Joined:
    Aug 19, 2014
    Posts:
    72
    Hi

    I have an addressable asset (Asset A). The asset has a reference to a scriptable object. The scriptable object is also an addressable asset (Asset B) (because it is used elsewhere). Asset B has references to multiple textures and sounds.

    My question is how does this affect file size?

    Does Asset A also bundle up the textures and sounds used in the ScriptableObject (Asset B)? And does AssetB also bundle up a version of the textures and sounds?

    My thoughts are that if you were to load Asset A by itself, in order for it to work, it would need to have the assets from the scriptable object it references and so it must include it? Also, if I just wanted to load Asset B, it would also need to have its own references.

    So I guess here are my questions:

    1. If you have multiple Addressables that each contain references to shared assets such as textures, does each addressable include a version of those assets, or are they shared somehow?

    2. If I have an addressable ass that contains a Scene, within the scene, it has references to other addressable. If I load the addressable with the scene, will it also download the other addressable dependencies?

    3. Would putting the above items into the same group solve the loading problems?

    4. If I have two addressable assets, A and B. A has a reference to a Scriptable Object called X. Addressable B has a reference to another Scriptable Object (Y) and that object references Object X. Does addressable B duplicate the content from the Scriptable Object X? Does it make a difference if the Assets are in different groups?

    Thanks,

    Adam
     
    Last edited: Sep 21, 2020