UMG Grid Slot Update

Hey all

Yet another Blueprint question that’s giving me grief. I’ve attached a screenshot for reference. Basically, whenever I add an item to my array, I use a Blueprint Interface to send out a message that I’ve updated my array. I receive that message in my UMG widget, get the array info, and try to add it to a new slot in a non uniform grid panel. I’m using non-uniform because I’d prefer just rows with no columns. For some reason, I can’t get the darned thing to work. Any thoughts?

Thank you!

You are referencing and adding it correctly, it seems.

  • Is *GridPanel *or Item set to collapsed/hidden?
  • Have you tried printing the indexes out?
  • Did you configure the Panel in any specific way?
  • Do you see the panel at all?

Good thoughts! Thanks for the input :slight_smile: I have a print string wired up on my character blueprint so when I fire off the action key it lists everything in my array. It will also fire another print string when I add something to my array. I tried adding a print string in the UMG blueprint and nothing happens. Attached is a screenshot. I’ve also checked the visibility of the panels and it all seems to be good. Regarding configuring the panel, it’s set to variable, pretty sure that’s all I changed.

Hi, tommygdawg!

Before forloop (adding ITEM widget to GridPanel17) you must clear child for GridPanel17.

Scratch that. I added a custom event to fire off the add child to grid command, rather than use a Blueprint Interface, and that seems to work fine. However, whenever I pick up a new item, it always inputs the name of the first Item I’ve picked up as the name for the rest of the items into the grid slot. Any idea why that might be?

Apologies, I didn’t see that before making my second response. I tried adding a clear child at every point in the execution path and at each point it either resulted in no children or children without text. Not sure why that happens?

Can you show us the designer hierarchy?

Attached is a screenshot.

I’m calling another UMG widget which is just a text block with a button and no canvas; I’m using that to fill the new rows I’m creating.

The setup looks solid to me. If you are seeing the same text in all dynamic widgets (ITEM), it has to be one of the following:

  • the Item’s text block is not bound to the exposed variable (unlikely as you seem to know well what you’e doing)
  • you are modifying the exposed variable one more time after the widget’s creation (overriden constructor perhaps or perhaps an additional custom event)
  • the struct array you’re looping through does not contain what you expect - that’s the most likely cause; have you tried peeking inside that struct before creating the widgets?

You could also run the Widget Reflector (in Designer: *Window *–> Developer Tools → *Widget Reflector *at the very bottom)to see how the widgets behave during run time. Maybe this will give you a hint if all else fails.