Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Alan Gray on June 01, 2012, 05:04:50 PM

Title: font sprite incorrect after atlas change
Post by: Alan Gray 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?
Title: Re: font sprite incorrect after atlas change
Post by: Nicki 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. ;)
Title: Re: font sprite incorrect after atlas change
Post by: ArenMook 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?
Title: Re: font sprite incorrect after atlas change
Post by: Alan Gray 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.