Untiy TextMeshPro (TMP for short) component details

Description:
TextMeshPro is the ultimate text solution for Unity. It's a perfect replacement for Unity UI Text and legacy Text Mesh.
The powerful and easy-to-use TextMeshPro (also known as TMP) uses advanced text rendering techniques along with a set of custom shaders; it dramatically improves visual quality while giving users incredible flexibility in creating text styles and textures.
TextMeshPro provides greater control over text formatting and layout, providing character, word, line and paragraph spacing adjustments, kerning, text alignment, links, over 30 rich text tags, multiple fonts and sprite support, custom styles, and more Function.
Powerful performance. This improved visual quality and flexibility comes at no performance cost since TextMeshPro creates geometry using the same two triangles per character as Unity's text components.

ps:并且在最新的正式发布的unity2022版本中,unity不在主动提供Text组件和老版本的TextMesh组件


1.创建一个TMP的UI 

Please add a picture description


2.使用代码控制

Need to add namespace

using TMPro; 

correct variable name

public TextMeshProUGUI TMP;

Only use the variable name of TextMeshProUGUI to mount TMP at the script.



3. Detailed explanation of TMP components:
First of all, the UI will generally haverectangle transformationandlayer renderingEach mode of two components Please add a picture descriptionTMP Text Style:
Please add a picture description
Please add a picture description
Please add a picture description

Guess you like

Origin blog.csdn.net/blastospore/article/details/128756032