Using a customised .ttf file I created a Text Mesh Pro font which works perfectly fine in the editor, but when I run a build of the project all the text objects return to the default font?

I don’t know but this thread might help

https://forum.unity.com/threads/textmeshpro-text-doesnt-show-up-in-built-game.538121/

I’m already using TextMeshPro - Text (UI) components, I guess TextMesh seems now to be slightly different since that thread was made.

Though I did find a solution I’ll post for anyone who this might help in future. I did 2 simple things so I’m not sure if one or both was the actual fix. Hope this helps!


SOLUTION

  • First of all I noticed in PlayerSettings>TextMeshPro>Settings the field for a DefaultFontAsset. This was set to the font ‘Liberation’ which is what my text was reverting to after building, so I swapped it out for my custom font.
  • Then I looked for where the ‘Liberation’ font assets were located in my Assets, and put my custom font assets in the same locations. I had two my custom font assets like this:

186865-capture.png

custom (Font) placed in: Assets/TextMeshPro/Fonts/

custom (TMP_Font Asset) placed in: Assets/TextMeshPro/Resources/Fonts&Materials/