UI element doesn't align perfectly

Hello!

I created a canvas, with this settings:

8318346--1091700--upload_2022-7-28_7-58-22.png

Then, under this canvas I created a GameObject that has a 128x85 pixel image (let's say it's for the player inventory, PPU = 32). This GameObject is scaled to be 5 times bigger on both the X and Y axis.
My problem is that when I click on the image, I see a small gap between the lines and the image, like this:

8318346--1091694--upload_2022-7-28_7-55-33.png

I can't understand why this happens. If I go to the GameObject that has my image and input something like 0.121(...) for Pos Y, it kind of aligns. This does not happen on the X axis, there it aligns perfectly.

Any ideas? Maybe I'm drowning in a glass of water, but my OCD is killing me. I've tried multiple options but to no avail (changing the scale, changing reference resolution, changing UI Scale Mode, etc.)

Any help would be much appreciated.
Thanks!

8318346--1091688--upload_2022-7-28_7-51-30.png

The 2D forum is not related to UI. The forum for UI is here.

I'll move your post for you.

[quote=“MelvMay”, post:2, topic: 889369]
The 2D forum is not related to UI. The forum for UI is here.

I’ll move your post for you.
[/quote]
Thanks! Sorry for the mix up

1 Like