Hello
We have an issue where we need to mask the text when its moved under a mask. Can you suggest how this can be done?
For sprites we just set the mask interaction enabled but we are not sure what to do with a SuperTextMesh object.
Text for Unity, Super-Powered! · By
Hmm... with regular sprites, I don't believe the shader supports this, but if you're using Unity UI, masking should work! (Try messing with the values exposed on your text material in the material's inspector!)
I can look into seeing what it'd take to allow masking support on the shader exactly, iirc it's something to do with the stencil buffer...?
We have cards which have text and they are inside a scrollview. The parent has a sprite mask and it works for the images but not the text. I tried having both a SpriteMask and a Mask but that didnt work. If I have JUST a mask it does seem to mask the text but given that we need this to work with a SpriteMask (or in addition to a Sprite Mask) I am currently confused as what a next step could be...
When you say scrollview, do you mean a Unity UI scroll view? If so... check out the "UITest" sample scene to see some masking examples. (It's a bit messy, I know...)
If it's Unity UI, I believe just the parent object needs a Mask attached to it. Then, on the Super Text Mesh object, you can change the Mask Mode from "Inside" to "Outside". The order of objects in the hierarchy plays into masking!
If it's not Unity UI... I'll look into this a bit more! So just lemme know!
The issue we were having is we have a sprite mask and it didnt seem to work with the mask. However we used this Stencil buffer setting and it seems to have worked: https://gamedev.stackexchange.com/questions/176170/how-to-use-a-sprite-mask-or-shader-to-mask-a-text
I have absolutely no idea what this does or why it works. But it seems to for now...