User Guide (Version 1.17)

Setting Canvas Size in Preview

Change your game UI canvas size in UI Editor Preview to visualize how your canvas might look at different screen resolutions and to see how the interactive elements change state. Changing your canvas size in Preview does not affect the canvas size at which you are authoring the UI canvas—that is controlled in the UI Editor.

Setting your canvas size in Preview is useful when designing games that run on devices that have multiple resolutions. You can see at different resolutions how an element's size and position changes based on the settings of its Transform2d properties, such as anchors, offsets, and the Scale to Device settings. The Scale to Device flag adjusts the size of the element by computing the ratio of the preview canvas size to the reference canvas size and applies that scale to the element. You can see the effects of this computation in the UI Editor canvas Preview.

The Canvas scale in the toolbar shows the scale at which the canvas is displayed. If the Preview canvas size selected is larger than the viewport size, the canvas you are previewing is drawn at a reduced scale.