You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro:
The following is observable in master right now by running the test scene and skipping + advancing.
Print text to a TMProUGui component that includes sprites. Ex: "This is a sprite !"
Change the text to something else.
Call UpdateGeometry on each MeshInfo. Ex:
var textInfo = this.TextComponent.textInfo;
for (int i = 0; i < textInfo.meshInfo.Length; i++)
{
textInfo.meshInfo[i].mesh.vertices = textInfo.meshInfo[i].vertices;
this.TextComponent.UpdateGeometry(textInfo.meshInfo[i].mesh, i);
}
The issue is sort of with TMPro. As an optimization they leave the SubMesh objects around that are used to render the sprites. They use the same SubMesh objects for fallback fonts. Then, in TextAnimation, calling TextComponent.UpdateGeometry(this.textInfo.meshInfo[i].mesh, i); causes the garbage sprite mesh info to be resupplied to the SubMesh.
We should be able to use TextInfo.ClearMeshInfo() before every print to fix.
The text was updated successfully, but these errors were encountered:
Repro:
The following is observable in master right now by running the test scene and skipping + advancing.
The issue is sort of with TMPro. As an optimization they leave the SubMesh objects around that are used to render the sprites. They use the same SubMesh objects for fallback fonts. Then, in TextAnimation, calling
TextComponent.UpdateGeometry(this.textInfo.meshInfo[i].mesh, i);
causes the garbage sprite mesh info to be resupplied to the SubMesh.We should be able to use TextInfo.ClearMeshInfo() before every print to fix.
The text was updated successfully, but these errors were encountered: