Unity Game Development — Building UI Elements in Unity
However subtle or obvious you may wish your user interface to be, Unity makes it easy to create complex overlays to display your valuable game information. In this article, I will walk you through how to create a basic UI.
The first step in creating a user interface in Unity is to create a Canvas Asset. The Canvas Asset is responsible for displaying and managing UI elements in our scene. You can create a Canvas in the same manner as you create any other Game Asset in Unity.
- You can use the GameObject Menu on the menu bar: UI > Canvas.
- You can use the “plus” button on the Hierarchy Window: UI > Canvas.
- You can right-click in the Hierarchy Window: UI > Canvas.
Along with the Canvas, Unity will also create an EventSystem GameObject. The EventSystem will handle events that come from user input.
Let’s take a look at the Canvas Component.
- The RectTransform Component of our…