Page 1 of 1

Pixels per unit with UI

Posted: Sat Aug 05, 2023 1:56 pm
by rauljl1
Hi, Tony.

I'd like to use a sprite sliced on my UI response button.

But, when I put the sprite, the image looks thinner (wrong image). Every canvas in my game have Pixels per Unit on 1.

If i put Pixels per Unit at 6 looks good (pixel perfect image), but I don't like that way.

How to keep the pixel size?

Re: Pixels per unit with UI

Posted: Sat Aug 05, 2023 2:44 pm
by Tony Li
Hi,

Did you 9-slice your sprite? If so, make sure the button's image is set to Sliced.

If that doesn't address the issue, you may need to adjust the canvas's Canvas Scaler reference resolution to make it lower, or reduce the image's pixels per unit.