Why is a UIListLayout hiding my content?

Kia ora developers!

For some reason when I add a UIListLayout to my frame filled with image labels and frames, the content is hidden instead of displayed correctly. I was originally adding a UIListLayout via script but I have done it using the explorer in the following video to make it easier to follow:

Does anyone have any idea what I could be doing wrong? It’s a fresh UIListLayout and I haven’t changed the properties of the frame other than size and position.

Thank you all for your help!

Is it supposed to be horizontal? Have you tried setting the FillDirection?

It is supposed to be horizontal, but that shouldn’t make a difference to whether or not the content shows at all.

1 Like

It may have something to do with the ZIndex of the children. I would increase it to 2 and see if that fixes your issue. I believe it gets weird when it’s already a child of something, though it only happens sometimes.

In my code, I put the UIListLayout in before the UI objects are created and that’s when the issue started for some reason. I also tried having the UIListLayout in the frame before the game starts and that didn’t work either. I set the Z-index to 999 of the UI objects and unfortunately, I am still having the same issue. :sob:

Hmm strange maybe your studio is bugged and showing it incorrectly, or you have some code that is doing that which could also be possible.

What do you have the size set to on the Y axis for your ImageLabels/Frames?

I’m not sure how applicable this is as the images display fine before the UIListLayout, but on the Y axis they have a size of 1. ClipDescendants is off.

The ListLayout is erroring/returning as incalculable, which is weird.

You’re not using AutomaticSize for any of them, right? Have you tried to remove them and manually add them back into the Frame one at a time?

I’m using aspect ratios on most of the UI objects and just setting the scale to 1,0,1,0.