UI Scaling

UI can have missing line or lines with different width. It can be caused by those reasons:

  • Game window Scale is not an integer.

    Make sure that the Game window Scale is 1x (2x in case of HighDPI display).
    In any case, the Scale should be an integer, otherwise, lines will have different thickness.
    For example, it can be downscaled from 1920x1080 (game window render size) to 1280x720 (if the scale is 0.66): then some 1-pixel lines will be lost, but some still be visible, because the visible screen size is not enough to display them all.
    Similar will if the game render size is 1280x720 and the scale is 1.5: all lines will be visible, but some lines still be thicker than others.
    _images/scaling-2x.jpg

    Scale = 2x

    _images/scaling-down.jpg

    Scale = 0.77x

    _images/scaling-up.jpg

    Scale = 1.7x

  • Game window render size does not match with Canvas Scaler settings

    UI rendered in size specified by Canvas Scaler settings, then scaled to match the Game window render size and then multiplied on Game window Scale.

    Check Canvas Scaler settings:
    - UI Scale Mode = Constant Pixel Size then should be no problem is the scale is an integer
    - UI Scale Mode = Scale With Screen Size then make sure Reference Resolution is equal to Game window render size or make integer multiplier.
    For example Reference Resolution = 1920x1080 and Game window render size = 3840x2160 -> multiplier = 2 is okay
    If Reference Resolution = 1920x1080 and Game window render size = 2560x1440 -> multiplier = 1.33 will be problem with lines thickness.
    - UI Scale Mode = Constant Physical Size, similar to Scale With Screen Size but relies on display DPI, so it scale can be different for different devices.

    The Game window render size can be changed with a dropdown left from the Scale (Free Aspect on the screenshot).