Documentation

Support

Unity Studio

Open Unity Studio

Unity Studio

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:
  1. In the Hierarchy, click the + button to open the Create menu.
  2. 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 a
UI Transform
instead of the regular Transform component. A
UI Transform
is a rectangular transform designed for 2D elements.
The UI Transform enables you to move, resize, and rotate UI elements. You can do this directly in the Scene view or enter specific values in the Inspector. The UI Transform component has the following properties:

Property

Description

AnchorDefines 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.
PositionSet the object's location in 2D world space (X, Y).
SizeSet the object's width (W) and height (H).
RotationRotate the UI element. Set this value to a number in degrees.

Additional resources