- Home /
Pixels from a sprite aren't the same size
I have multiple sprites in my game that I'm using, and all of them suffer a condition which makes some pixels from the sprite larger than others. For example, here is an 'X button' I'm using in a canvas:
The X's left side appears much thinner than its right side, but in reality, the sides have the same width, and were rendered incorrectly. When the camera moves the sprites in the game view, they resize and change the pixel measurements, but they never appear all the same.
A long time ago, I fixed this problem by rotating the camera slightly (by 0.1 on the z axis), but this doesn't work on canvases. Using a sprite material which has "Snap to pixel" doesn't fix this, but makes the deformities consistent and not random.
Use one of the Pixel Perfect camera scripts. I think there is a free one on the Asset Store.