Correct way of loading different content

My Addressable contains Sprites and AudioClips. Is the following way a good approach to load this?

spritesHandle = Addressables.LoadAssetsAsync<Sprite>("MyAddressable", null);
audioClipsHandle = Addressables.LoadAssetsAsync<AudioClip>("MyAddressable", null);

var loadedObjects = await UniTask.WhenAll(spritesHandle.ToUniTask(), audioClipsHandle.ToUniTask());

I’m not sure of this code loads the Addressable two times and then takes only the requested assets, which is especially with remote assets (probably) not the best approach.

Does anyone know?

I am not sure what the null you are passing into LoadAssetAsync is, what version are you on?

but I suppose it’s fine to do it that way, if you see no errors should be fine.

@sniffle63 The null parameter is the callback, which I don’t need because of async/await.

The main question is not if I can do it this way, but whenever this is the best approach taking remote assets into consideration.
It is currently not clear if above code will download the same asset twice or not, which could be an issue for mobile apps.

You’ll have to debug to find that out on your own. If you don’t understand how code is executing then don’t do it that way, do it a way you understand.

My previous question still stands tho, I do not have a second parameter on my LoadAssetAsync call and there is no overload for it, so curious what version you are on.

Version 1.19.6