Search Unity

Loading an addressable folder from address instead of label?

Discussion in 'Addressables' started by Avalin, Aug 25, 2021.

  1. Avalin

    Avalin

    Joined:
    Oct 12, 2018
    Posts:
    98
    I am currently using this piece of code to load a list of gameObjects from an addressable folder:

    Code (CSharp):
    1.         public static void LoadGameObjects(string key, Action<AsyncOperationHandle<IList<GameObject>>> onAllGameObjectsLoaded)
    2.         {
    3.             Addressables.LoadAssetsAsync<GameObject>(key, null).Completed += onAllGameObjectsLoaded;
    4.         }
    The thing is, the "key" seem to have to direct to a label, rather than the address. I don't really like using the labels as much, as they clutter up pretty quickly. Is there a way to load from the address?
     
    Last edited: Aug 25, 2021