Hello,
I’m using TMPro 2.0.1 with Unity 2019.3 and I noticed a small glitch of just one frame where the texture appears to be fully white or maybe just missing:

This is quite random and I could not manage to catch it or make a repro project exhibiting it yet.
Anyone having the same issue? It happens on PC and on Switch
Edit: managed to catch in the editor! In the inspector, the texture displays fine. Unfortunately, when I start the frame debugguer or make the scene view visible, the text in the game view magically gets fixed.
There are two potential cause of this behavior. The first would be the Async compilation of shaders which can be disabled in the Editor Settings.
The other possibility is SDF Scale which could occur if you are doing any type of scaling of the text object or any of its parents. Are you doing any type of animation or scaling of the text object?
That async shader compilation setting is only for the editor right? My problem also happens in builds of the game so I don’t think that’s it. I’m going to try though, just in case. I’ll let you know. EDIT: doesn’t fix the issue.
I’m going to check but I don’t think there is any scaling done on the text directly. However, the parent transform is indeed animated with a zoom-in / zoom-out type of animation. Is there a way to disable that sdf scale?
SDF Scale is essential for the text to render correctly. This initial white block representing the letter occurs when the SDF Scale is 0 which is likely due to the animation state.
Since there are many ways to setup animations, make sure the scale of the text object is uniform (X, Y, Z) all using the same values. Often the Z is left at zero. Double check the animation by stepping over each frame to see how this affects the scale of the text object.
Indeed, having the animation never go completely to a scale of (0, 0, 1) but rather a small value like (0.01, 0.01, 1) seems to fix the issue. Thanks.
1 Like