I’m trying to create an item pickup log to show items that have been recently picked up. (small potion x 2).
I have an Item Data component that transfers the quantity and item name through a BPI after I interact with it and have the item added to my inventory.
The BPI fires an event inside my {item_pickupLog} Widget which creates another widget called {PickupLog Banner} that has the design of the UI i want for each item. After the banner is created I plug in the data from my Item Component and add the widget to my wrap box as a child.
I’ve added the {item_pickupLog} to my Main UI but it will not show the children added to it. I’ve confirmed with a print string that it is indeed creating children for the wrap box but it will not show.
If I manually add a banner to the wrap box it DOES show up, when I preview my game.
I’ve verified that all my widget layers are set to visible including the border’s content opacity.
I’m kind of lost here and not sure why they wont show up. Looking for thoughts.
Thanks for the response. I just tried that, it actually cleaned up the children in the print string. Seems like more were getting produced for some reason? Thats strange but the original problem still exists. I only removed the IS Valid as you said
You are welcome!
There’s no need for the IsValid check because the widget is being created manually, so it will always return Valid, unless you manually change the Class at the Create Widget function to None.
My second thought regarding the problem would be: are you using any Slide/Fade in animations for when the log items are first added?
Initially Yes I was using a slide animation. But I did remove it earlier to see if it would work and It doesn’t. In the Banner, I only have a pre construct event > Get table row>Set Item image>Set Text. I’ve completely removed the animation node.
Your comment made me double-check the translation of each item in the widget to see if I may have offset it for the animation but everything is 0 in the hierarchy.
You said the widgets do appear when added manually; I would suggest replacing the WrapBox with a VerticalBox, then creating and adding any widget other than the PickupLogBanner widget to it.
In my Item Data component where I had originally messaged the BPI to fire the Update Log Event. I was creating the widget in order to reference it to target the BPI.
What I did instead was to get all widgets of class and get a copy like below and it works now. I stuck with the wrap box