Search Unity

Question What can I pass into the keys parameter for LoadAssetsASync or LoadResourceLocationsAsync?

Discussion in 'Addressables' started by Lucas-Hehir, Jul 14, 2020.

  1. Lucas-Hehir

    Lucas-Hehir

    Joined:
    Jul 2, 2014
    Posts:
    41
    According to this Unite 2019 video:



    He's passing in two strings, the first called a key and the second a label. He clarifies that "Assets can have addresses and labels. At runtime, they're the same."

    So my understanding from that is that I could pass in two strings that are both labels, ask for the intersection, and receive only the assets or locations of assets that feature both the given labels. Am I understanding this correctly?

    When I try to do the above, it doesn't work. The returned list simply features 0 objects, meaning no assets matched the intersection query I guess. However it does work if I ensure that the first key matches the name of an addressable asset, like "Tree" in his example.

    I'm still relatively new with Addressables so I can't tell if this should be possible and I've stuffed something up or not...
     
  2. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    Yes that should work. If it doesn't work, you should report a bug.
     
    Lucas-Hehir likes this.
  3. Lucas-Hehir

    Lucas-Hehir

    Joined:
    Jul 2, 2014
    Posts:
    41
    Perfect, I thought so, thank you. I think the content needed to be rebuilt because it's working now.