I’m curious if there’s a more or less efficient way to load assets from an AssetBundle. At first I stored loaded AssetBundles in a dictionary and called bundle.LoadAsset() to retrieve and instantiate an object from the bundle.
I now iterate through all objects of a bundle immediately after loading the bundle and store them in a dictionary, key being the asset’s name and value being the asset’s GameObject. Doing it this way I can simply call dictionary.TryGetValue(name, out obj) then instantiate obj, rather then calling LoadAsset() every time I need an object.
Is there a recommended method of loading/instantiating objects from a bundle?