To display a Hello World text message, follow these steps:
- Create a new Unity 2D project.
- Import the provided Fonts folder, as described in the Getting ready section. Copy these font files into your Unity project – they need to be in your Assets folder.
- In the Hierarchy window, add a Text GameObject to the scene by going to GameObject | UI | Text. Name this GameObject Text-hello.
Alternatively, you can use the Create menu immediately below the Hierarchy tab. To do so, go to Create | UI | Text.
- Ensure that your new Text-hello GameObject is selected in the Hierarchy window.
Now, in the Inspector window, ensure the following properties are set:- Text set to read Hello World
- Font set to Xolonium-Bold
- Font Size as per your requirements (large – this depends on your screen; try 50 or 100)
- Alignment set to horizontal and vertical-center
- Horizontal and Vertical Overflow set to Overflow
- Color set to white
The following screenshot...