Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - esaevian

Pages: [1]
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:

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

Pages: [1]