Displaying a “Hello World” UI text message
The first traditional problem to be solved with new computing technology is to display the Hello World message, as shown in the following screenshot:
Figure 1.5: Displaying the “Hello World” message
In this recipe, you’ll learn how to create a simple UI text object with this message, in large white text with a selected font, in the center of the screen.
Getting ready
This recipe follows on from the previous recipe, so make a copy of that and work on that copy.
How to do it...
To display a Hello World text message, follow these steps:
- Open the copy of the project from the previous recipe.
- In the Hierarchy panel, add a TextMeshPro GameObject to the scene by going to GameObject | UI | Text - TextMeshPro. Name this GameObject Text-hello. A Canvas and EventSystem GameObject will also be automatically added to the scene.
Alternatively, you can use the Create...