Padding & UIGrid/List Layouts

Hi, I’m working on an Inventory UI for my game - However, I’m stupidly accurate in the way I organise // arrange my objects / icons.

In the image below I use GridLayout to organise the tools in the Players inventory - HOWEVER, you can see on the left in comparison to the right the gap. Is there any way I can work out this spacing to allow for greater accuracy?

image

image

Left is 2 Pixel width and right is 8 pixel width. :l

1 Like

The only thing I can think of is to change the size of the boxes to fit the gap.

ex: if they’re 25x25 right now, and there is 6 extra pixels, probably make them 27x27

Make sure in your GridLayout that your HorizontalAlignment is set to Center:

image

1 Like