-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MeshEffect doesn't work with Layout system #6
Comments
Hi @markv12 |
I also seem to get similar errors when adding the Shadow effect for the first time. |
Yes. I fixed some of this plugin. |
The relevant changes are in BaseMeshEffect.cs only correct? If a TextMesh Pro object on a canvas has a ContentSizeFitter and I do anything like add another UI object to the canvas, I get this error and several others for UVs, Colors, etc...
|
I am using this library for the Outline 8 shadow effect on a TextMesh Pro Text object. The resulting shadow is sharper and looks better on pixel fonts than the default TextMesh Pro outline.
But I'm finding that it doesn't work well with the Unity layout system.
If TextMesh Pro text objects are part of a layout or have a ContentSizeFitter on them, At certain times, especially if you call:
LayoutRebuilder.ForceRebuildLayoutImmediate(GetComponent<RectTransform>());
You get an error like this:
Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array. UnityEngine.Mesh:set_vertices(Vector3[]) TMPro.TextMeshPro:GenerateTextMesh() (at Library/PackageCache/[email protected]/Scripts/Runtime/TMPro_Private.cs:3796) TMPro.TextMeshPro:CalculateLayoutInputVertical() (at Library/PackageCache/[email protected]/Scripts/Runtime/TextMeshPro.cs:534) UnityEngine.Canvas:SendWillRenderCanvases()
Any idea what might be causing this?
Thank you!
The text was updated successfully, but these errors were encountered: