Canvas
Create a UI Canvas to hold all your UI elements.
Read time 1 minuteLast updated 4 days ago
A User Interface (UI) Canvas is the base area where you place all your UI elements. Think of it as a blank sheet where you can place your buttons, text, images, and other controls. You can create multiple canvases in one project to show different UI layouts at different times. Every UI element must belong to a canvas. Currently, you can only create 2D UI canvases in Unity Studio. 3D UI canvases aren't supported.
Create a Canvas
To create a Canvas:- In the Hierarchy, click the + button to open the Create menu.
- Select UI > UI Canvas. A new Canvas appears in the Hierarchy panel and the Scene view.
How the Canvas positions UI elements
Each UI element uses aUI TransformUI TransformProperty | Description |
|---|---|
| Anchor | Defines where the element stays relative to its parent, such as the canvas or another UI element. Use the dropdowns or select areas of the anchor preset to choose a position, including the top, bottom, left, right, center, corners, or stretched horizontally, vertically, or both. Anchors help ensure your UI remains properly positioned and adapts well to different screen sizes or when the window is resized. |
| Position | Set the object's location in 2D world space (X, Y). |
| Size | Set the object's width (W) and height (H). |
| Rotation | Rotate the UI element. Set this value to a number in degrees. |