Documentation

Unity Spark

Open Unity Spark

Unity Spark

UI Editor window reference

Explore the UI Editor's elements, toolbar tools, UI Style settings, canvas controls, and keyboard and mouse shortcuts in Unity Spark.
Read time 4 minutesLast updated 3 hours ago

The UI Editor is a flat view of your game's screen where you drag elements into place. It opens as a tab next to the Scene view when you select a UI element that's drawn on the screen, such as a canvas or a button. It doesn't open for a canvas in the 3D world. For instructions, refer to Open the UI Editor and add canvases.
The UI Editor tab next to the Scene tab, showing a main menu canvas with Play, Customize, and Options buttons. The Hierarchy window on the left has UI Canvas selected, and the element toolbar is at the bottom.

The UI Editor with a main menu canvas open.

Element toolbar

The toolbar at the bottom of the UI Editor holds every UI element you can add. For more information about each element, refer to UI elements.
The following elements are only available in this toolbar, not in the Hierarchy window's Add object (+) menu.

Element

Use for

IconReady-made symbols such as hearts, coins, and arrows.
ShapePanels, frames, and backgrounds styled by your UI style.
Progress BarHealth, loading, timers.
To return to the selection tool, select Select (Esc).

Top toolbar

The toolbar at the top of the UI Editor has the following tools.

Tool

Description

Snap (magnet icon)Snaps elements to alignment guides as you drag. Hold Ctrl (macOS: Cmd) while dragging to temporarily enable or disable snapping.
AlignAligns the left edges, centers, right edges, tops, or bottoms of two or more selected elements.
DistributeSpaces three or more selected elements evenly, horizontally or vertically.
Camera displayShows one of your scene's cameras behind the UI, so you can view how it sits over the game.
Auto-anchorSets each element's anchor automatically from where you place, move, or resize it.
Aspect-ratio menuPreviews different screen shapes. Refer to Preview different screen shapes.
UI StyleOpens the UI Style settings, at the right end of the toolbar. Refer to UI Style settings.
When you have more than one canvas, the canvas menu shows the canvas you're editing and lets you choose a different one.

UI Style settings

The UI Style settings set the appearance of every element in your game at once.

Setting

Description

PresetSets the style preset: Clean, Arcade, Fantasy, Sci-fi, Cute, or Pixel.
ColorsAdjusts the style's colors.
TextSets the heading and body fonts and sizes.
ShapeSets the corner radius, border width, and shadow.
Reset everything to the presetStarts over from the selected preset.

Context menu

Right-click (macOS: Ctrl+click) an element on the canvas to open the context menu. If the element isn't selected, right-clicking it selects it. If you right-click inside a selection of several elements, the commands apply to every selected element. When you right-click the canvas itself, the menu shows only Add UI Element.
The context menu contains the following commands.

Command

Description

Add UI ElementAdds the element you choose from the list inside the element you right-clicked, or inside the canvas.
DuplicateCreates a copy of each selected element.
DeleteDeletes the selected elements. You can also press Delete or Backspace.
Bring to FrontMoves the element in front of every other element that shares its parent element.
Bring ForwardMoves the element one place forward among the elements that share its parent element.
Send BackwardMoves the element one place back among the elements that share its parent element.
Send to BackMoves the element behind every other element that shares its parent element.
Elements that are lower in the Hierarchy window draw on top of the elements above them, so the layering commands also change the element's position in the Hierarchy window.

Canvas navigation controls

Use the following controls to move around the canvas.

Action

Controls

ZoomScroll.
PanHold Alt (macOS: Option) and drag, or drag with the middle mouse button.
FramePress F to fit the selected element in view, or the whole canvas when nothing is selected.

Keyboard and mouse shortcuts

The UI Editor has the following keyboard and mouse shortcuts.

Shortcut

Action

Delete or BackspaceDelete the selected elements.
Drag on an empty part of the canvasSelect several elements at once.
Ctrl+click (macOS: Cmd+click)Select an element nested inside another.
Hold Shift while resizingKeep the proportions.
Hold Alt (macOS: Option) while resizingResize from the center.
Drag an image from the Project window onto the canvasAdd the image to the canvas.

Additional resources