Super simple question : is there a way to get a full list of all Addressables in a C# script?
I can’t seem to find anything in the documentation that just lists all the addressables I’ve assigned…
I’m expecting about 10000+ non-atlased PNGs (base textures, and normal maps), and I wanna do some testing to see if Addressables will give me some much needed optimization.
You should be able to do this with:
[ContextMenu("Show Me The PNGs")]
public async Task ShowMeThePNGs()
{
var op = Addressables.LoadResourceLocationsAsync(".png");
await op.Task;
Debug.Log("Check out my pog collection:");
foreach (var r in op.Result)
{
Debug.Log(r.PrimaryKey);
}
}
You have to pass in some sort of search term (‘key’) but it would need to be something all your PNGs have in common, like ‘.png’. It’s not going off the assets path, it’s going off each assets ‘Address’.
I recommend using a label as your key if you’ve got 10k of these assets.