- Home /
Question by
Kevin-is-king · Aug 07, 2019 at 07:30 AM ·
textfont3d text
3D Text not changing font
I have recently started using the 3D Text and i tried to change the font of it. All i have gotten was the text all messed and unreadable Here is my code:
public TextMesh countText;
public TextMesh topText;
public TextMesh switchText;
public Font defaultFont;
public Font newFont;
// Start is called before the first frame update
void Start()
{
topText.GetComponent<TextMesh>().font = newFont;
switchText.GetComponent<TextMesh>().font = newFont;
countText.GetComponent<TextMesh>().font = newFont;
}
testissure.png
(144.2 kB)
Comment
Answer by eplante · Aug 07, 2019 at 05:16 PM
I'd recommend you use TextMeshPro for this kind of thing. It should be available directly to you if you have the lastest unity version, if not, get it from the asset store. It may fix your problem.
Your answer
Follow this Question
Related Questions
TextMeshProUGUI Font Disappearing on Low FPS,Unity TextMeshProUGUI Font Disappearing 0 Answers
How to fix TextMeshPro breaking lines and escaping random characters? 0 Answers
Is there a way to get the size of text? 1 Answer
Color.white not so much white... 3 Answers
How to make on screen text resizable 0 Answers