SYSTEM INVENTORY (VR)


Hi everyone :slight_smile:
I’m working on a VR project in which I have an Actor that functions as a main menu. From this menu, I can access different submenus — one of them is an inventory system. All of these are implemented as Widgets.

Im ussing the actor menu from vrtemplate map

The inventory system is handled through an Actor Component, and the logic for storing items in the inventory is working correctly — items are added properly to an array.

The issue I’m facing is when I try to display the items in my inventory widgetnothing shows up.

My inventory system is made of two widgets:

  • The parent widget: HUD_INVENTARIO_EQUIPMENT_FEATURE
  • The child widget: WM_SUB_MENU_SLOT_EQUIPMENT

The child widget represents each slot (item), and the parent widget is responsible for storing and displaying them. I have a function that is supposed to load all the slots every time it’s called, but I can’t get the inventory to visually appear in the menu Actor.

I’ve verified that the logic runs, and the array seems fine, but the UI just doesn’t show the items

Does anyone know how to get those items to display?.


Hello @TQJADRAX

My suggestion would be to add one child widget into the wrap box in designer window and see if it will show up properly. It’s to make sure that slots can actually display inside this wrap box.

If it doesn’t show up, then it might be the case of not having enough room.
Another thing could be a race condition, try adding a short delay before you try to add slots. I believe just after you resize the array would be a good spot to do it.

Hi @DonBusso

Thanks for the suggestion, unfortunately it still doesn’t work, any other ideas? I’ll set the delay to .5 after resizing the array.

I will attach a short video of how things are shown.
It is inspired by the SAO menu (it’s an anime)

I can see that 15 entries are created, but they have no data? If you’re not creating more then one list of widgets then your problem is data not coming though, most likely because a reference isn’t valid.

My suggestion would be passing over a reference to your inventory component when you create the widget itself. (Create HUD INVENTATIO …). So basically don’t pass over self into your CARGAR INVENTARIO function. Instead you would already have a reference in your widget and you would use that instead. Should be a quick thing to test out.

I’m not entirely convinced that where you pass Self to function that it’s actually valid.

Where I created the widget is in the inventory component actor.
Now it no longer displays anything. What I did was remove the load inventory function from the component actor and get the reference to play the entry animation of the widget in question.



Do you think I understood your idea correctly? Or not?

Not quite. Let me help you with some visual aids. I made a mock up blueprints and widgets and I kept some of your naming so it’s easier for you to follow. Hope that clears things up.


Let me know if that worked at all or if you need more clarification.

where do you create the WBP_example widget, is it in the component actor or in another widget?
I say this because of the reference you use when creating it.

I create this widget in Inventory Component, just like you do.

2nd screenshot from your original post.

BP_EXAMPLE_COMPONENT = AC_Inventario

WBP_EXAMPLE_WIDGET = HUD_Inventario

Sorry I should have kept all the names as you did.

I’m going to try it dont worry

Now the access none appears in the inventory component reference of the load inventory function

Thanks for helping me, I found a solution, I literally redid the inventory XD, thanks for the tips @DonBusso you helped me a lot. I just need to correct some visual issues like the scale but nothing more serious.

1 Like