SoftMaskForUGUI icon indicating copy to clipboard operation
SoftMaskForUGUI copied to clipboard

Runtime generated graphics (like textmeshpro submesh) aren't softmaskable

Open pajama opened this issue 4 years ago • 1 comments

When textmeshpro fonts are bolded they generate a child graphic of type TMP_SubMeshUI. These objects are regenerated on play, so softmaskable components need to be added to them procedurally, which is expensive.

But also when the softmaskable is added to them at runtime, the text goes completely invisible. Disabling the added softmaskable makes them visible again, but whenever it is enabled, the text disappears.

I should also note that when I switch it to "Visible Outside Mask" it ends up being visible inside the mask. So there must be something strange going on with the world position calculation.

  • SoftMaskForUGUI 1.0.0
  • Unity 2020.3.14f1
  • TextMeshPro 3.0.6

pajama avatar Sep 08 '21 16:09 pajama

Also a note on the submesh from textmeshpro. It seems it's only ever generated if a font weight is selected where a replacement font is assigned. image

pajama avatar Sep 08 '21 16:09 pajama