How can I use AddressableAssetGroups in runtime?

I have my assets organized by Addressables groups.
How can list the groups in a build?

Thanks.

EDIT:
I tried using labels but all I can do is use labels with preLoad or LoadAssets, I can’t list addressables by labels.
How can I use an Addressables “structure” with UnityEngine?

I think I’m having the same issue as Sorting Packed Assets Group s thread.
Having the possibility to organizing assets by group, in the editor, and being able to use that organization in the build, I think, it would be useful.

This sounds intersting, but I would like to fully understand your need. Let’s imagine you have a group called “FunGroup”, and we put a label on everything in that group. what exactly are you wanting when you say you want to “organize” things at runtime?

var x = Addressables.GiveMeSomeInformation("FunGroup");

What information are you needing? what is x?

Thanks,
Bill

Let me create a example:
Lets say I have a stage, and I want put one charater at a time on stage.
Each charater will have a voice, soundfx, and a mesh.
If I have a group for each,a voicesGroup , a soundfxGroup and a meshGroup, then I would do:

var voice=Addressables.GetGroup("voicesGroup").LoadAsset("charaterA")
var sdfx=Addressables.GetGroup("soundfxGroup").LoadAsset("charaterA")
var mesh=Addressables.GetGroup("meshGroup").LoadAsset("charaterA")

What I end up doing in my project, was to create a ScriptableObject to manage the Groups in the editor, and then I could use the groups in the build of the game.

I already have seen people using Addressable groups for Localization, one group for english other for french.
And then use the path to access:

Addressables.LoadAsset($"{language}/speakA");

I’m a small project and I don’t like having a complicate build process.

You already do kind of that with scenes, via Addressables.LoadScene, I think that is like having special group “ScenesGroup” that you can iterate over.

Another use case :
if I could iterate over a Group I could for example have a billboard with a random image from a BillboardImagesGroup, without much effort.

EDIT: I couldn’t find a way to list all the addressable items with labelX. Is that possible?

ok. so if the group had a label, then you could accomplish what you want with LoadAssets() by sending in a List with both “voicesGroup” and “characterA”. the texture variations sample has a similar loading pattern: https://github.com/Unity-Technologies/Addressables-Sample/tree/master/Advanced/Texture%20Variations

as to the “list all addressable items”, you can do LoadResourceLocations. This provides the locations. Currently, there’s no way to get from those locations back to the address, but we are looking at adding that as there are quite a few use cases.

I’m doing as you suggested.Thanks.

I found the use of the word “group” misleading because suggest that you can group assets by commom characteristics.
But the use cases of groups are for managing and building “assets packages”.
To use groups as I intended in the example feels like a hack.