Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: kyledouglasolsen on May 22, 2013, 01:13:38 PM
-
We're having an odd issue:
(http://imgur.com/tLPFnGF.png)
It seems that dynamic text will randomly break and stop rendering specific letters on several of our Android devices. Any ideas on what's causing it?
Thanks,
Kyle
-
We have this same exact problem, I'm curious to see what the fix is!
-
No idea, I've never seen it happen, but if you find out, let me know.
-
Same problem here on Android.
-
We're having this issue as well, not just Android devices, happened on my iPhone5 as well, just once though.
Its really hard to reproduce this issue which makes it hard to debug...
Aren said this in another post:
When the texture's dimensions change, NGUI marks the font as dirty, which in turn forces all labels to refresh their content, which should cause everything to update correctly.
According to Unity's Doc on Font.RequestCharactersInTexture:
RequestCharactersInTexture may cause the font texture to be regenerated if it does not have space to add all the requested characters. If the font texture is regenerated it will only contain characters which have been used using Font.RequestCharactersInTexture, or using Unity's text rendering functions during the last frame. So it is advisable to always call RequestCharactersInTexture for any text on the screen you wish to render using custom font rendering functions, even if the characters are currently present in the texture, to make sure they don't get purged during texture rebuild.
So its either the font's textureRebuildCallback doesn't get called, or (some of) the labels didn't refresh their content therefore didn't force the font to call the RequestCharactersInTexture?
I'm wondering, instead of calling RequestCharacterInTexture for each labels on the screen, can we call the RequestCharacterInTexture API once and pass the combined string of all the labels? Is it even worth a try?
-
There are several threads on this issue. At one point I even changed it to force-refresh every single label in the scene every time the text changed. No effect. This issue lies in Unity somewhere. Unity reports the characters being present, when in fact they are not -- at least not at the time of the request.