Impossible to make an actually uniform grid in UMG?

I’m trying to make an uniform grid that adjusts to whatever is inside uniformly. So for example if I add one square border, the grid becomes square, and if i add another square border under it, it becomes rectangular vertically.

what I actually want is to set up a 3x7 grid with of perfectly square borders with images, similar to this:

but I just can’t make the grid fill the space uniformly. i tried wrapping the borders with scale boxes, but no deal.

any ideas?

hmm most inventory have predefine slot. they are set during construct and limit to like 10,20.50 slot. you can probably create those slot at runtime, where you add border/slot, set it image, quantity and all that. but maybe this used more cost than normal method. its simpler to just array loop item data and set to the predefined slot without creating new slot. i dont know, im not pro at this. but there must be reason why all inventory are made like that.

What do you mean?

(some slots are intentionally empty)

1 Like

I mean make that grid scale uniformly, keeping its own aspect ratio and the ratio of the images, while its inside a horizontal box with something else by their side:

You mean like this:

Try a Scale Box

well the scale box didn’t do anything. I tried to set up it exactly like yours with images instead of borders, but the only way it behaves like that is if I manually set each image size inside the grid to be precisely 148.2 x 148.2, which obviously, setting the images sizes isnt what I want since the whole point is that the uniform grid scales its content automatically.

Yea, all my images are 100x100 but they are all scaled because of the Scale Box.

I added a scale box in the previous post, as you suggested, but it doesn’t scale properly. could you share your project so I can check what’s different than mine?

There you go:

NewBlueprint.uasset (71.8 KB)

1 Like

Thanks, I just had to set the scalebox like this: