Scaling Screen Size causes pixels to not line up

Hi everyone,

I’ve been running into a problem when I have two UnityEngine.UI.Image (s) that I need to line up so that the vertical edges are flush.

The problem is that, based on changing the screen size, the pixels seem to shift left and right.

This also happens to some of my smaller UI elements: for example, an oval appears to be a rectangle depending on the point on the screen it is at.

I assume that this has something to do with canvas scaling (I use 1920x1080p scale by width).

Can anyone offer some help or resources about this issue?

Thanks,
Aaron

Have you tried setting the canvas to constant pixel size? There are a few different options for that problem under the canvas component

Scaling to a constant pixel size would be fine but I would prefer to build the UI for any sort of resolution. What I need is some way to use vector graphics in unity but it seems like unity wants to scale things in some weird way that isnt quite accurate because things get offset from one another based on the size of the screen.