This week is all about the user interface (UI) but it’s such a huge subject we’re only going to be looking at a couple parts — text elements and buttons.
You’ll use text UI for showing the scores, displaying the title of the game, letting the player know when they’ve won or lost, etc.
In our sample game this week we’ll be using only one button, but that button will be doing multiple jobs — making game objects vanish, enabling scripts, and playing music.
The first part of this week’s lessons don’t need anything special, just create a new scene in any project. But the second part needs a special Unity project so you’ll need to download it from this link:
Unity UI Project (right-click and save to your computer, then unzip)
If you’d like more information on the topics covered in the videos this week, here are some links that will help:
GameObject.Find() (opens in a new window/tab)
The Unity UI System (opens in a new window/tab)
In one of the lessons I show how to import a custom font into Unity. If you don’t have an Open Font (.OTF) or True Type (.TTF) font available, you can download one from the following site:
daFont Website (opens in a new window/tab)
Sound used in this lesson: Title: Canadian Geese Migration, recorded by Mike Koenig.
Creating Text Elements (5:02)
Using Custom Fonts (3:03)
Creating A Button (4:42)
Using the Button OnClick Feature (4:20)
Back to the Beginning 2D Game Development Dashboard