Reputation: 31
I tried to change the font by the C# script in the real time. it changed in the inspector but the text mesh looks like blended.
When I pause and change to another font and return to the desired one it looks fine.
So how do I fix this issue ?
is it a bug ?
EDIT
Here is my code:
public TextMesh text;
void Awake()
{
en_font = Resources.Load<Font>(“font Name”);
text.font = en_font;
}
Upvotes: 0
Views: 10713
Reputation: 4746
Try This Code :
Font ArialFont = (Font)Resources.GetBuiltinResource (typeof(Font), "Arial.ttf");
textMesh.font = ArialFont;
textMesh.renderer.sharedMaterial = ArialFont.material;
Upvotes: 7