- Home /
Problem with displaying a value digitally
Hello,
most people around here already know that i'm working on a dashboard project and since i got complaints from some people i will post a new question about it.
I want to digitally display the numeric speed/rpm/whatever values on my speedometers and have them update.
I tried with a textMesh, but they are very unhandy to place and mess up as soon as i change my font.
Do you know of a possible solution?
thanks in advance
Are you going to be changing your font often, or just once. How exactly are they messing up?
the font is only assigned once, while the value is supposed to change once a second.
$$anonymous$$essing up means : become undreadable
Sorry, I was getting confused between a GUI Text component and a Text $$anonymous$$esh Component :/
Answer by Retribution · Jun 07, 2011 at 02:11 PM
When you say the font become unreadable, does it appear that your letters are just becoming mangled garbage? I believe what is happening is, if you are changing the font of your text mesh, but you are not updating the material/texture your text mesh is using, your font will become unreadable, as it is using a font type and a material that do not match.
Based on the scenario you described, I'm assuming you're changing your font through script at runtime. Try also updating the material of your text mesh with the material of the font when you assign your text mesh a new font.
You can also test this in the editor while the game is not playing as well to see if this is your issue. If you have a text mesh object you can access, drag a new font onto that object in the editor and watch how the font changes. If you drag that fonts material onto your object as well, you should see it update and become readable again with your new font type/size.
Hope that helps
Your answer
Follow this Question
Related Questions
I can't change the text mesh 1 Answer
A node in a childnode? 1 Answer
Outline Text From TTF. 2 Answers
Text Meshes not rendering correctly on iOS device 1 Answer
Importing Custom fonts into Unity? 5 Answers