TMPro Rendering issue.
Hello, we are using TMPro for text in our project. I was noticing that when designing text within our scene everything would appear fine. But when building and playing the scene text would start rendering as white boxes. This would appear at random, some text would render fine, but others would render as white boxes. These text are using the Text Mesh Pro script not the ugui one. And they are using the TextMeshPro/Mobile/Distance Field shader. One thing i noticed is that if i wait a certain amount of time then disable the object, then re-enable it the text renders fine. Also disabling the Text Mesh Pro Script then renabling it will also lead it to render normally. For example I have a script waiting for a second in start, that just toggles the text.
private IEnumerator Start()
{
yield return new WaitForSeconds(1.0f);
if(textLabel != null)
{
textLabel.enabled = false;
textLabel.enabled = true;
}
}
Will turn text from looking like ...
to this ... ![alt text][2]
Anyone have any idea on why this is happening and how to fix it? Happens in editor as well as android. [2]: /storage/temp/139383-unity-2019-06-03-11-10-42.png