Adding the canvas

Here are the steps for adding a canvas for our UI:

  1. Right-click in an empty area of the Hierarchy panel and select UI | Canvas. You can review the details of the canvas in the Inspector panel. 
You will note, in the Hierarchy panel, that Unity created an EventSystem when you created your canvas. This system is used to manage user input.
  1. Change the new canvas GameObject's name from Canvas to HUD_Canvas. Using self-descriptive names for our GameObjects is considered good development practice. No other changes to any of the canvas properties are necessary.

Get Getting Started with Unity 2018 - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.