Author Topic: font sprite incorrect after atlas change  (Read 7898 times)

Alan Gray

  • Guest
font sprite incorrect after atlas change
« on: June 01, 2012, 05:04:50 PM »
Every time I add a new texture to my atlas, the font refers to the wrong sprite. The sprite reference for the font changes to some other seemingly random texture in the atlas. It's fairly easy to fix - just have to go reassign the sprite for the font. But soon we will have more fonts in the atlas and be incrementally adding textures to the atlas - so the pain will increase. Is there some magic button I'm missing to get the font to relocate the font sprite after the atlas changes?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: font sprite incorrect after atlas change
« Reply #1 on: June 01, 2012, 05:36:31 PM »
Instead of actually reassigning it, you can do a little trickery by selecting the font prefab, and setting spacing x (or y) to 1 and then back to 0, then it magically pops back into place. ;)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: font sprite incorrect after atlas change
« Reply #2 on: June 02, 2012, 12:17:52 AM »
Curious, I've never seen that. Did you happen to change the name of the sprite that the font is using?

Alan Gray

  • Guest
Re: font sprite incorrect after atlas change
« Reply #3 on: June 06, 2012, 08:01:06 PM »
Looks like it was operator error. I've been adding lots of textures incrementally to the atlases and haven't seen this again. It's possible it corresponded to a sprite name change when I saw it before.