Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Ability to load an addressable asset with multiple labels?

Discussion in 'Addressables' started by JoWi_Uniform, Nov 8, 2019.

  1. JoWi_Uniform


    Jul 14, 2017
    Is it possible to load an addressable asset by passing a list of AssetLabelReferences?

    This is the line i'm having issues with:
    Code (CSharp):
    1. AsyncOperationHandle<IList<GameObject>> LoadingHandler = Addressables.LoadAssetsAsync<GameObject>(Label, null);

    I've got addressables loading via one assetlabelreference perfectly for what I want.
    Now, however i'd like to extend the system to allow selection of objects that only have all the labels I'm searching for.

    Instead of just 1 label I'd like to provide a list, I was hoping that this would be a built in feature as I think you can provide a list of keys that can return a list of assets?

    Everything I've tried so far hasn't worked, I tried my own repeating addressable load, sorting through which assets matched which labels but it's very slow and not very efficient.

    Can anyone suggest any solutions here?

    Cheers, Joe