The Ease of Building UI Elements In Unity

One of my favorite things about Unity is the tools that it has to make things that were once extensive and drawn processes, simple and easy. They have tools for Animation, Terrain Generation, TileMap Editors, and many more! But today we're going to focus on Unity’s helpful built-in features for building your User Interface.

What is a User Interface (UI)?

A User Interface is a game or program’s visual displays of information to the player.

The most commonly recognized example of a UI is the HUD (Heads Up Display) which is the visual UI elements attached to an overlay over the game's camera. The HUD affixes certain elements to it such as health/experience bars, menus, dialogue, mini maps, and more.

But UI can also consist of floating text/combat text which is when numbers or text related to combos, points, damage, healing, critical strikes, etc are displayed to the player on the screen, or above a character’s head.

What is a GUI then?

GUI stands for Graphical User Interface and is any element of the UI that includes graphical controls such as buttons that you can click on, or even button prompts that appear in order to tell the player when they should press a certain button to perform certain actions such as opening doors, talking to NPC’s, or deflecting an incoming blow.

So what makes up a UI?

Any UI element that you create will be displayed on the “Canvas” game object.

Any elements that allow for interaction with the UI such as Buttons will utilize another game object called the “Event System”.

Both the “Canvas” and the “Event System” will be automatically generated into your scene if you don’t already have them in your hierarchy and you create a UI game object.

[NOTE]

If you right-click on the hierarchy menu you can hover over the word UI and see all the different components you can add such as Text Objects, Panels, Scrollbars, or Buttons!

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!