- Home /
Loading Addressables of different Types
I've been trying to use the Addressables Features in my Project now, but haven't really been able to find a good Solution yet.
Loading multiple Assets by Label seems like a really nice way to load multiple Objects at once and have them be topical. The call for loading by Label would look something like this:
Addressables.LoadAssetsAsync<Sprite>(_label, null).Completed += Loading_Complete;
The Result of that would be a List of Sprites, but what if I want to load a GameObject, a Sprite and a Tile in the same Label?
Does this mean that all Assets that will be loaded using a label need to be of the same Type?
Also if I were to load a single Asset via an Address e.g.
public void LoadByAddress(string _address)
{
Addressables.LoadAssetAsync<Tile>(_address).Completed += TileLoaded;
}
private void TileLoaded(UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle<Tile> obj)
{
// Doing something with my obj.Result
}
Does this mean that I need to have all that Code just for loading a Tile and then replicate that when loading an asset of a different Type?
I might be missing something really obvious here, but I would love any help I can get, since every implementation of Loading with Addressables has been very messy due to this confusion.