Is it possible to create widget in C++ using UWidgets instead of SWidgets?

Bogdan Madzhuga
Mon, 07 Feb 2022 20:52:12 +0000
UI

I am trying to create an inventory panel widget. I created a slate widget, which draws NxM slots, and each slot has an index of inventory item, and on rebuild event I take item id by slot index, after I get Image from item Database by ID, and draw this image. The problem is that the operation of getting Image from Database takes a big amount of time, and if for one/two slots it’s okey, for NxM slots it will be extremely bad. In Blueprints I just had an array of WSlot and I could call update function only for WSlot where ID was changed, but if I am updating Panel Slate, it fully redraws and I can’t save resources. So I think it should be possible to create UWidget using Widgets. For instance create UCanvas and add there my USlots or SSlots and call update only for specific instances. So are there any tutorials in the net?

1 post - 1 participant