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

Retrieving address for a loaded asset

Discussion in 'Addressables' started by carsanlop, May 2, 2019.

  1. carsanlop

    carsanlop

    Joined:
    Dec 12, 2017
    Posts:
    11
    Hello all,

    One of my main problems is going around the APK size limitation. As of now, I am using AssetBundles for that. On a boot scene, I download the AssetBundles while the user is already enjoying some content. After they are downloaded, I open them as store as needed: on collection, on dictionaries, etc. Then, on the game, I can access them through my own classes. For example, my AssetBundle "PlayerIcons" gets into a dictionary where each key is the avatar name, and then I can do stuff like image.sprite = dict["avatarKey"].

    Given my use-case, what I did was use
    Addressables.DownloadDependencies
    and
     Addressables.LoadAssets
    in order to load the dependencies at boot, and then proceed to store it as I did with the assetbundles. So far, so good. This also allows me to retrieve them synchronously without modifying existing code all over. However, the problem with this approach is that I am not able to retrieve any information about the Addressable (things like group, address, labels, etc.). And I would really like to have that information, to be able to mix and match several load methods and have a unified way of referencing a given asset.

    My question, therefore, is:
    • Is there any way to retrieve the Addressable information for an already loaded asset?
    • Or, is there any way to load a group of AssetReferences?

    Thanks.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    we are looking into ways to address this workflow, but haven't quite locked that in yet. I'll sure to make a big splash in the changelog announcement once we have something that helps people backtrack from a load to info about what they loaded.
     
    senfield likes this.