Unity UI System: Canvas Scaler Component

Gerald Clark
2 min readJan 3, 2024

--

In the Screenspace canvas types, the canvas scaler component’s UI Scale Mode option becomes changeable.

There are 3 options:

  1. Constant Pixel Size
  2. Scale With Screen Size
  3. Constant Physical Size

CONSTANT PIXEL SIZE:

This is the one that is usually set at default. This references the current pixel size of the UI elements. If the screen resolution changes, the UI elements will ignore scaling. It keeps it’s original pixel size regardless of the screen’s resolution.

SCALE WITH SCREENSIZE:

This scales the UI Elements according to the screensize. So, if I want to build a game at a 16:9 aspect ration, I’ll need to set my canvas’ reference resolution to something like 1920 x 1080.

Now when the screen size changes, so does the image. I use this most often.

CONSTANT PHYSICAL SIZE:

This is basically the exact same as constant pixel size, except this one makes UI elements retain the same physical size regardless of screen size. Using the Constant Physical Size mode, positions and sizes of UI elements are specified in physical units, such as millimeters, points, or picas.

--

--