I’ve been putting together an inventory system for an RPG, where the player can expand their inventory by equipping new clothing.
To do this I have an Inventory Component which creates a widget for the inventory HUD, inside of this HUD widget is a List View with each item being a piece of clothing that adds extra spaces, and each piece of clothing has its own widget with a Tile View in it that should be filled with a number of item slot widgets.
Here’s what it looks like in the widget preview:
Here’s what I’ve got in blueprint:
It’s getting the ItemSlots variable from the clothing blueprint and creating an item widget for each one and adding them to the tile view, I’ve confirmed with Print String that the item widgets are being created and I made sure they inherit from IUserObjectListEntry which is all I need to do as far as I know.
However the Slots don’t appear when I run the game:
I did some experimenting since Tile View is new to me, I went into the blueprint for the clothing widget and set it to add an item to the Tile View on construct, I didn’t think it would work because it was asking for an object reference not a class reference:
For some reason it worked and spawned the item slot widget:
So then i tried making a custom event and having the inventory component call that event:
But that doesn’t work, it comes back with a blank clothing widget when I run the game.
I’m at a loss, Can someone help me to understand what is going on here? Why are the item widgets not displaying?