Unity-TextMeshPro

Time:2022-5-6

Vector text will not become unclear due to zooming in and out;

1.TextAsset

Window/TextMeshPro/Font Assets Creator

Create textasset font;

image-20220426191811638

Sourcefont is Font in TTF format (there is a font in fontsettings format in unity that cannot be converted)

Size picture word size, padding interval

Packingmethod packaging format, the fastest and best, with clear impact;

Atlas resolution font atlas size, too small will be very unclear;

Characterset is generally custom or fromfile. Import from TXT or manually input the word to create textmesh;

Rendermode rendering mode, affecting aliasing;

All settings can be generated;

Dynamic generation

image-20220426192428434

In the textmeshsdf attribute, you can choose to dynamically generate words instead of static creation each time, which is more fragrant; Change static to daynamic

Sometimes textmesh is not displayed on the UI. It may be a shader problem. Modify the shader;

image-20220426192613541

2.SpriteAsset

Use pictures as text in textmeshpro component to realize mixed arrangement of pictures and texts, or pictures replace text;

Next, replace the injury number with a picture to achieve the following effect;

image-20220426190804918

image-20220426190746485

Select the atlas to make text, right-click to create spriteaset, and then put spriteaset into textmesh Pro \ resources \ sprite assets directory; (original PNG)

damage-1

Open the spriteaset attribute interface to adjust the picture scale and other information for adaptation;

image-20220426163803247

Set the default sprittetext in the projectsettings interface; You can use pictures in the way of rich text;

image-20220426163707213

Recommended Today

Big data Hadoop — spark SQL + spark streaming

catalogue 1、 Spark SQL overview 2、 Sparksql version 1) Evolution of sparksql 2) Comparison between shark and sparksql 3)SparkSession 3、 RDD, dataframes and dataset 1) Relationship between the three 1)RDD 1. Core concept 2. RDD simple operation 3、RDD API 1)Transformation 2)Action 4. Actual operation 2)DataFrames 1. DSL style syntax operation 1) Dataframe creation 2. SQL […]