Since there has been a UI and the need to display on more than one type of screen (basically since the days of arcade when you knew what you were running on), there has always been the challenge how to best design and implement a good UI that will work on any resolution, especially in Unity!
Note
We will just cover the basics in this section, and full examples will be given in Chapter 4, Anchors Away when we cover building responsive layouts with Anchors.
To answer this call with the new Unity UI system, Unity has created a resolution scaling component that is attached to a Canvas by default in order to control the resolution-based drawing of the GameObjects and components within; this component is called the Canvas Scaler.
The Canvas Scaler has several modes of operation that alter how the Canvas is scaled when drawn to the screen:
Constant Pixel size
Scale with Screen Size
Constant Screen Size