mob-sakai / MeshEffectForTextMeshPro

Mesh effect components for TextMeshPro in Unity.
MIT License
160 stars 26 forks source link

Some errors occur when TMP_SubMesh is destroyed #5

Closed mob-sakai closed 5 years ago

buihuuloc commented 5 years ago

I got this error message when resizing the Text canvas

Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array.
UnityEngine.Mesh:set_vertices(Vector3[])
Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_uv(Vector2[])
TMPro.TextMeshProUGUI:GenerateTextMesh() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:4046)
TMPro.TextMeshProUGUI:OnPreRenderCanvas() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:1642)
TMPro.TextMeshProUGUI:Rebuild(CanvasUpdate) (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TextMeshProUGUI.cs:209)
UnityEngine.Canvas:SendWillRenderCanvases()
Mesh.uv2 is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_uv2(Vector2[])
TMPro.TextMeshProUGUI:GenerateTextMesh() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:4047)
TMPro.TextMeshProUGUI:OnPreRenderCanvas() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:1642)
TMPro.TextMeshProUGUI:Rebuild(CanvasUpdate) (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TextMeshProUGUI.cs:209)
UnityEngine.Canvas:SendWillRenderCanvases()
Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_colors32(Color32[])
TMPro.TextMeshProUGUI:GenerateTextMesh() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:4049)
TMPro.TextMeshProUGUI:OnPreRenderCanvas() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:1642)
TMPro.TextMeshProUGUI:Rebuild(CanvasUpdate) (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TextMeshProUGUI.cs:209)
UnityEngine.Canvas:SendWillRenderCanvases()
mob-sakai commented 5 years ago

This problem occurs when changing transform y scale.

gamma032steam commented 4 years ago

Commenting out the offending line in the package also worked for me.