fix: changes not reflected in rendering when TextMeshPro is cleared

close #351
This commit is contained in:
mob-sakai
2025-06-09 13:49:12 +09:00
parent ecd265e482
commit f508eb32ca
@@ -234,6 +234,13 @@ namespace Coffee.UIEffects
for (var i = 0; i < textMeshProUGUI.textInfo.meshInfo.Length; i++)
{
var meshInfo = textMeshProUGUI.textInfo.meshInfo[i];
if (meshInfo.vertexCount == 0)
{
s_Mesh.Clear(false);
textMeshProUGUI.canvasRenderer.SetMesh(s_Mesh);
continue;
}
s_VertexHelper.Clear();
meshInfo.mesh.CopyTo(s_VertexHelper);
if (i == 0)