For the life of me I cannot get these things to load their textures. No matter what I do it will not load unless I hardcode the text into the widget, but that obviously is pointless since I’m building a dynamic list.
The brush settings I’ve left basically on defaults during testing.
It refuses to load the texture. If I use a blocking load with a regular image widget instead of common lazy image widget then it works just fine, but I don’t want to do a blocking load here as it’s building a dynamic list and that could get pretty slow.
Does anyone have any idea why this doesn’t work? Am I missing a setting somewhere? I’ve been toggling everything like crazy. I’ve tried loading the texture a dozen different ways including directly after the create widget function call and it still just refuses to work.
I believe it thinks the lack of an image IS the image for it to lazy load and that calling SetBrushFromLazyTexture does quite literally nothing. Has anyone managed to get these to work programmatically?
Ok, I’ve confirmed Common Lazy Image works perfectly fine at runtime outside of a Common Tile View, but inside of a Common Tile View no async loading of any kind appears to work. Has anyone gotten async loading working with Common tile Views? That’s the point of these if we can’t efficiently load widgets into them.
Edit: Tested just built in Tile View instead of CommonUI version. Same issue. Async loading of assets is entirely non-functional for these widgets. What in the world is going on here?
I think I’ve figured out what’s wrong. You don’t create the widgets the pass them to AddItem. You create a UObject data object and pass that through instead.
Yup, that was the issue. For anyone with the same problem create a new BP with a parent o Object. Add whatever variables you need to pass to the tile objects. For example a Texture2D soft object reference. Expose those variables on spawn.
Now in your tile view widget you’ll loop whatever data you’re building from. For me that’s just a data table. You’ll then create those payload objects and pass them to add item. Example as follows.
Next in your object list widget that you’ve set in your tile view widget you’ll need to use the OnListItemObjectset event provided by the UserObjectListEntry interface (add it to your widget if you haven’t yet). Example as follows.