Documentation

Unity Spark

Open Unity Spark

Unity Spark

Add and style UI elements

Place text, buttons, images, and other elements on a canvas, and give your whole UI a consistent appearance with a UI style in Unity Spark.
Read time 2 minutesLast updated 3 hours ago

Add elements from the UI Editor's toolbar to create your menus and heads-up display (HUD), and pick a UI style so every element shares the same appearance. Pick the style before you add elements, so new elements match from the start.

Add elements

The toolbar at the bottom of the UI Editor holds every UI element you can add. For what each element is for and how to use it, refer to UI elements.
To add an element:
  1. Select a tool.
  2. Do one of the following:
    • Click the canvas to place the element.
    • Drag on the canvas to draw the element at the size you want.
You can also drag a tool directly onto the canvas. To return to the selection tool, select Select (Esc).
To add an image from your project, drag it from the Project window onto the canvas.

Duplicate, delete, and layer elements

Right-click (macOS: Ctrl+click) an element on the canvas to access Add UI Element, Duplicate, Delete, and the layering commands (Bring to Front, Bring Forward, Send Backward, Send to Back). When you right-click the canvas itself, the menu shows only Add UI Element.
To zoom, pan, and frame the canvas while you work, refer to Canvas navigation controls.

Give your UI a style

The UI Style settings set the appearance of every element that follows the style, all at once.
To set a UI style:
  1. Select UI Style on the UI Editor's top toolbar.
  2. Select a Preset: Clean, Arcade, Fantasy, Sci-fi, Cute, or Pixel.
  3. Optional: Adjust Colors, Text (heading and body fonts and sizes), and Shape (corner radius, border width, shadow).
To start over, select Reset everything to the preset.
Buttons, toggles, sliders, scrollbars, input fields, dropdowns, scroll views, and progress bars that you add from the toolbar follow the style, and so do elements that the AI assistant creates. Style changes apply to them automatically. Text, images, icons, and shapes that you add from the toolbar don't have a style role, so they don't follow the style. If you restyle one of these elements by hand, the next style change overwrites your changes.
To keep your own styling for an element:
  1. Select the element.
  2. In the Inspector window, select Detach from style.
To change which part of the style an element uses:
  1. Select the part of the element that you want to change.
  2. In the Inspector window, set Role in its Style Role component.

Additional resources