Synchronzied Asset Loading

Hello Community,

is there a way to load assets synchronously using Blueprints?

I have a list of asset class ids and asset ids. This list of class ids (a set of tower blueprints) and asset ids (tower icons for the interface) is different for each level and stored within a configuration object. Those assets need to be available at the beginning of the game. I tried using LoadAssetClass and LoadAsset but those methods are asynchronous and do not make my assets available in other blueprints. I need to ensure that everything is loaded when the UI is being created.

What is the best way to solve this kind of problem?

you could make an actor that contains a list of Texture2D references, and make that list editable. then place that actor in the level, and add the icons for that level to that list. do this for every level.

when a level loads, any actor placed in the level loads, and any direct references in those actors load as well.

or… you could have a placeholder icon that is used for every entry that has not been loaded yet, and replace it once loading is complete.

I thought about doing this too, but I am not really happy with configuring everything twice. I have a configuration object that stores a list of level structs as default values. This configuration object needs to be globally available, not only within that certain level. Therefore I am looking for a way to dynamically load referenced objects.

edit: as mentioned above, the async loading process does not seem to work at all

if you want it to be dynamically loaded, you should try the second option i mentioned, letting an Icon widget show a placeholder icon until the asset is loaded.

if you make a widget called Icon, and pass it a texture2D assetID (editable and exposeOnSpawn), you can let it load the asset while it displays its default image.

76076-loadasseticon.png