User Interface Kit

Hey Heten123, sorry for taking some time to answer, I was away these days.
Making this work with your own health variable is quite easy. Just make sure you are using our Player Controller (or parent your own controller to UI Controller) and then, whenever you want to change the variable, call the Update Bar event. Don’t forget to use the same name as you used in your layout for a “Bar ID”. You can check out our own examples inside the Example Character!

Hey Relrin!
The inventory is filled with random items in the “Create Inventory” function of the example character. In our example (don’t forget this is not an inventory system, just an example of how the window can be used) we are storing actors and not structs. What is happening is that the “Grid Inventory” widget is looping over the Inventory array (found in the example character), and spawns an “InventorySlot” widget for each actor. You should replace this array with your own items since if you are not using our character, the relevant cast fails. Then, the inventory slot’s “InnerBorder”, has a binding in it’s brush for the “Item.Inventory Icon”. That is where it finds what to render!

  1. Yes, I think the best way is to remove all the InventorySlots and just re-add them when the inventory changes.
  2. Given a name, you can toggle the relevant window on-screen. It’s not super useful, but I can think of cases where it’s handy (for example when an in-game window has to open another one)