Alright, working in Unity 2019.4.1 I have a glitch where, if I change the font of my Text Mesh via script at runtime, the characters get garbled:
I tried a solution from the forums here:
void resetChars(TextMesh textMesh)
{
textMesh.text = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
textMesh.font.characterInfo = null;
textMesh.font.RequestCharactersInTexture(textMesh.text, textMesh.fontSize, textMesh.fontStyle);
}
if(Input.GetKey("space"))
{
resetChars(GetComponent<TextMesh>());
GetComponent<TextMesh>().font = (Font)Resources.Load("Inter-Black-slnt=0");
}
But this made it worse. What is happening here and how can I change my Text Mesh font dynamically?
