Skip to main content
5 votes
Accepted

How to programmatically activate the Glow option in a Text Mesh Pro font

This is a shader variant using #pragma shader_feature, See SL-MultipleProgramVariants. "TextMeshPro/Mobile/Distance Field": ...
Mangata's user avatar
  • 2,581
4 votes

Caret not visible with TMP_InputField created from script

Found the answer burried several pages deep in google search pointing to the unity forum. Basically, one has to re-enable the component because the canvas is created via ...
akarnokd's user avatar
  • 233
2 votes
Accepted

Custom TextMeshPro Shader doesn't render on Android

The AlphaToMask flag is intended for use with multisample anti-aliasing MSAA. It's possible that you're using a different quality setting in the Editor than on ...
Kevin's user avatar
  • 6,234
2 votes
Accepted

How to animate a Text Mesh Pro font color transition in Unity when the initial color is unknown?

Hackish solution: Put two texts on top of each other, with the only difference that the one on top is colored and the one below is white. So the colored text completely obscures the white text. Then ...
Philipp's user avatar
  • 120k
1 vote
Accepted

Unity: Cannot access TMP_Text object from script in gameobject

The error itself means, that a reference - in your code the reference to the component TMP_Text - has not been set. A reference usually is either set in ...
Zibelas's user avatar
  • 4,346
1 vote
Accepted

Change the "Font Asset" of every TextMeshPro object

I think your solution of renaming the file in your file explorer is quite good, actually. You can then rename it back to the name you want inside Unity, and all the assets will point to the correct ...
DMGregory's user avatar
  • 135k
1 vote
Accepted

How to replicate TextMesh Pro Gradient ScriptableObject Interface?

There's a very similar example in the ColorUtility.TryParseHtmlString doc page. The main idea is to have a single Color field that is drawn with a custom ...
PepeOjeda's user avatar
  • 711
1 vote

How to make TextMeshProUGUI truncate the left part (beginning) of a line?

I would recommend using this method instead, which is for measuring a string without setting it: Vector2 TMP_Text.GetPreferredValues(...) https://docs.unity3d.com/Packages/[email protected]/...
James's user avatar
  • 111
1 vote
Accepted

How to make TextMeshProUGUI truncate the left part (beginning) of a line?

The method with x = characterInfo[i].info.vertex_BL.position.x; failed for some rect settings, so I fell back to @DMGregory's xAdvance method. I did modify it to ...
Frederik Steinmetz's user avatar
1 vote

How to make TextMeshProUGUI truncate the left part (beginning) of a line?

We could do this with a script that takes the text on behalf of the TextMeshPro, tries to layout the full string, and if it doesn't fit, takes only the subset of characters at the end of the string ...
DMGregory's user avatar
  • 135k
1 vote
Accepted

How to vary the Glow settings for a Text Mesh Pro font

When you don't know how to access a parameter of a shader in code, click the "Edit" button next to the material type selector to open its shader code. Search for "Glow" and you'll ...
DMGregory's user avatar
  • 135k
1 vote

Unity UI - Make text come out and go back in

Thank you for the help @Vaillancourt , @DMGregory and @Kevin - a mask works perfectly, will tune it further. How I done it: Create a Panel near the Button Added a Rect Mask 2D as a component on the ...
Stefan's user avatar
  • 107
1 vote

TMPro Double Outline

I know this is late but here's how you can achieve something similar. In the Asset Creator, load the font and increase the padding from 5 to 20 Once the font is generated, you can use the underlay ...
Indika Wijesooriya's user avatar
1 vote

Text Mesh Pro edges are not smooth when viewed by orthographic camera

I believe that there is a problem with your set up because you scale up the text, and that should not really be necessary. Here my result and its set up made using your camera settings: As you can ...
Pino De Francesco's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible