Gideon
Gideon

Reputation: 1

TextMeshPro submesh (sprites) not updating when setting Maskable by script

Edit: It was a bug on TMPro's side. Now fixed.

I have a column of TextMeshPro(UI) elements in a ScrollView, and they're set to mask, which it does just fine. At some point, I need to expand one of the elements to outside of the ScrollView, and I set ".maskable" to false by script. I can't expand the size of the ScrollView, since the other elements still need to be masked as before. Now, the normal text part of the text is "unmasked" correctly, but the sprites in the string keep masking as before. When I go back to the editor (pause), mask it, click next frame, unmask it, click next frame, it unmasks (and masks) correctly, but setting "maskable" to false then true by script (on different frames) doesn't fix it. I can also set the .text property to a new string (containing sprites), and those sprites will still be masked).

TMPro has one maskable property overall, but it seems as if the "internal maskable property used for the submesh" (containing the sprites) does not update through script like the main mesh (containing the normal text), but the submesh's "internal maskable property" does update when toggled in the editor.

Any idea how I can update the masking for the submesh? I've tried ForceMeshUpdate, but it doesn't work. It still uses the un-updated "maskable" setting for the submesh.

Upvotes: 0

Views: 647

Answers (0)

Related Questions