In the previous chapter, we discovered how to interact with game objects in the world space scene. Not only can these objects be balls and toys or tools and weapons, but they can also be buttons you interact with and other graphical user interface (GUI)—or just UI—widgets. Furthermore, Unity includes UI canvas components and an event system for building menus and other UIs.
UI usually refers to onscreen, two-dimensional graphics, which overlay the main gameplay and present information to the user with status messages, gauges, and input controls, such as menus, buttons, sliders, and so on. In Unity, UI elements always reside on a canvas. The Unity manual describes the Canvas component as follows:
The Canvas component represents the abstract space in which the UI is laid out and rendered. All UI elements must be children of a GameObject that has a Canvas component attached...