1
Support / Changing Fonts
« on: April 04, 2012, 06:47:33 pm »
Hello, I am having som difficulty changing fonts. Here's what I have:
It looks like it is actually switching the Font Data correctly. I check the inspector and the drop down for the font on that specific textmesh is correct.
The problem is the material doesn't update. So it's using the old font's material, with the new FontData...and it just show up on the Game Screen as gobbeldygook.
Is there a way within 2D Toolkit to update the material, or will i have to change the material myself?
Thanks!
-Esa
Code: [Select]
public tk2dFont newFont;
public tk2dTextMesh textMesh;
public function ChangeFont() {
textMesh.font = newFont.data;
textMesh.Commit();
}
It looks like it is actually switching the Font Data correctly. I check the inspector and the drop down for the font on that specific textmesh is correct.
The problem is the material doesn't update. So it's using the old font's material, with the new FontData...and it just show up on the Game Screen as gobbeldygook.
Is there a way within 2D Toolkit to update the material, or will i have to change the material myself?
Thanks!
-Esa