1 of 7

<UI in Unity>

Presented by Jaden Balogh

2 of 7

Topics

Goal: build a working main menu in Unity

  • UI elements: canvas, rect transform, text, image, button (and many more!)
  • Scaling + pivots
  • Making it do something (scripting)

3 of 7

Learning the Basics

UI elements: the building blocks

4 of 7

Placing Elements

Primary tools:

  • Positions/offsets
  • Anchors/pivots

Positioning is relative to parent.

Use presets 80% of the time!

Changes between absolute and relative positioning based on anchors

5 of 7

Fitting Different Screens

Apps need to fit many screen sizes - our options?

%-based scaling using anchors�(above example sets 20% margins on sides)

Scaling size of elements based on screen size

6 of 7

Putting it together

7 of 7

RIIIIIIIIISE! (bringing your UI to life!)

There are an infinite number of things you might want your UI to do!

Things we’ll cover:

  • Switch scenes (play button)
  • Exit app (quit button)
  • Open/close menu panels (credits button)