![]() |
VOOZH | about |
Text is essential for any game for showing score, health, timer or menu options. Unity offers two text systems: legacy Text (UI) and TextMeshPro (TMP). TextMeshPro is the modern, recommended option with better quality and more features.
TextMeshPro is Unity's advanced text rendering system. It provides sharper text, better spacing, and more styling options than the old Unity Text.
Method 1: Right-click in Hierarchy - UI - Text - TextMeshPro.
Method 2: If you see "Import TMP Essentials" popup – click Import. This happens the first time you use TextMeshPro.
When you select a Text element, the Inspector shows these key properties:
To update text during gameplay (score, timer, health), use a script.
TextMeshProUGUI is the component type for UI text. Change the .text property to update what the player sees.
You can style specific parts of text using tags (like HTML).
Common tags:
Fonts control how text looks. TextMeshPro uses .ttf or .otf font files.
To change font: