mob-sakai / SoftMaskForUGUI

Enhance Unity UI (uGUI) with advanced soft-masking features to create more visually appealing effects!
https://github.com/mob-sakai/SoftMaskForUGUI
MIT License
2.04k stars 268 forks source link

[v1] Runtime generated graphics (like textmeshpro submesh) aren't softmaskable #126

Closed pajama closed 2 months ago

pajama commented 3 years ago

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.

pajama commented 3 years ago

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

mob-sakai commented 2 months ago

Please try v2: https://github.com/mob-sakai/SoftMaskForUGUI/releases/tag/v2.0.0