Download

Load Asset (Async) Details

Hey Guys,

I have a bunch of Texture AssetID’s in a CSV file.

I am trying to use Load Asset in my widgets to load the textures as icons via a loop.

It seems as though only one asset actually ends up successfully loading for each widget.
loadAsset.png

I tried adding a boolean that will not call load asset until the previous attempt completes, this got more assets to load, but still not all of them.

Are there limits to the number of async calls that can be made at the same time?:frowning:

I think I found a bug in ue4… I am stepping through the kismet LoadAsset(…) function in visual studio and can see AssetID’s being skipped

Look at the strings of Asset and of FLatentActionManager::FindExistingActionWithPredicate(…) in the locals debug window.

They are different, yet the latent action manager returned an action.

Maybe it has to do with the name of the asset itself? maybe the Find function doesnt like dash characters or something?

Renaming did not solve the issue, assets still get skipped

Edit: TMaps and TSets are being used, as well as Key Iterators, maybe the length of my strings was effecting the hashing ability?

EDIT 2: I packaged my game and i have the same problem, perhaps renaming doesnt fix it.

I have the engine source, maybe i can attempt to fix it, although the LatentActionManager does not look inviting!

So i managed to work around this by having a widget PER call of load asset, so that the LatentActionManager could fetch a null action for the given Class that is trying to add an action.

Calling Load Asset within a loop will not work. What happens is the second call to load asset trys to get added to the latent action manager, but it uses the blueprint class instance as a key, which already has the previous action associated with it, so it never gets added. I think this is a bug.