Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

MeshEffect doesn't work with Layout system #6

Description

@markv12

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/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_Private.cs:3796) TMPro.TextMeshPro:CalculateLayoutInputVertical() (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TextMeshPro.cs:534) UnityEngine.Canvas:SendWillRenderCanvases()

Any idea what might be causing this?

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions