Author Topic: Fonts not displaying in Unity editor  (Read 2451 times)

mayafishing

  • Guest
Fonts not displaying in Unity editor
« on: March 06, 2013, 08:22:54 AM »
Hello everyone, my first post is about strange behavior of my fonts.

I put the font's image together with main NGUI atlas. It works fine at the start, but yesterday, some of the fonts suddenly disappeared in Unity's editor window and replaced with fragments of the main atlas. However, if I build it into the real device, everything is in exactly the places I have designed!

It's just in the editor where some of the fonts are messed up with fragments of the whole atlas.

I have tried to upgrade Unity, NGUI and restarted many times. Also I have tried to recreate all the fonts one by one and each step I took, such as remove the old font image from atlas, I always save the scene before taking the next step. But still the same.

So out of options, I am here to ask around if anyone has met this problem before and any possible suggestions to fix this issue.

Thanks in advance.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Fonts not displaying in Unity editor
« Reply #1 on: March 06, 2013, 09:40:33 AM »
You have likely changed the texture in the font, but the UIFont prefab hasn't updated properly. Try going into a font and set its spacing to 1 and back to 0. That tends to mark the font ans changed. Then save the project to make the prefab be saved and then it should be fine.

Some times UIFonts don't update when their atlases change for weird reasons - I haven't dug deep to finding the reason, but that workaround tend to fix it.

mayafishing

  • Guest
Re: Fonts not displaying in Unity editor
« Reply #2 on: March 06, 2013, 10:12:22 PM »
Hi Nicki,

Thank you so much for your solution. It worked!  :)