W_InventoryItem
These are the widget representations of your item.
The GetItemData function automatically gets the direct struct version of the item it is representing from the component the item belongs to. This is so we don’t store the same item information in two places and whenever the item is updated you don’t need to update the widget as well.
This should allow for more designer friendly architecture, as you could make two children of this widget, one for example the normal inventory item widget the player has in their inventory and then another for vendors and you could have them store items in a list format and things would still work together.
WBP_InventoryItem -> GenerateItemIcon is where icon generation is handled. It’s pretty straight forward, copying the behavior to other children should be simple. It uses the BP_PreviewActor to achieve this. The data asset editor window has a UI category which has various settings to adjust or optimize the generated icons.
Last updated