Adding a header text object
Of course, one of the best things to begin a game with is a title screen and that title screen will need to display the game's name. Let's learn how to do that while also learning more about how Unity's UI system works:
Just like we did in the previous chapter, we will first create a text object with the name of our game, so with that in mind go to GameObject | UI | Text.
Just like before, this will create three objects, which we'll talk about in more detail now:
Canvas – This is the area where all of the UI elements will reside and if you try to create a UI element without one, Unity will create one for you like it did here. From the Scenes view, it will draw a white rectangle around itself to show you how large it is. The game object contains a Canvas component which allows you to dictate how the image will be rendered, as well as Canvas Scaler to make your art scale depending on the resolution of the device the game is running on and Graphic Raycaster which determines...