- Home /
Mask a Sprite with multiple SpriteMasks?
Would it be possible to have a Sprite masked by two different Spritemasks? Specifically, to have an already masked Sprite also be masked by another SpriteMask? Here is a diagram explaining the issue I'm facing when testing:
The character portrait is supposed to be masked by SpriteMask 1 here, but they appear fully because of SpriteMask2.
Thanks, cheers~
I have the same issue with a similar setup. I have read, that you can fix this via the sorting layers, but thats not true.,
That is also what I have read, but I've tried every possible configurations, without any success.
This looks like a UI. Why are you using Sprite$$anonymous$$ask/SpriteRenderer and not $$anonymous$$aks/Image components? The UI.$$anonymous$$ask has the behaviour you need I believe. Also: lovely graphics. ;)
Because I need the flexibility of Sprite and Sprite$$anonymous$$ask compared to $$anonymous$$ask/Image. It looks like a UI in the mockup because it was easier to explain the issue like this, but it doesn't really look like that in game. The Sprite$$anonymous$$ask situation stays the same though.
Hi, I have the same problem. Were you able to resolve this ?
Nope, and I'm now 100% sure there is no way of doing it directly with Unity Spritemasks.
This is probably the way to do it haven't figure it out yet myself: https://docs.unity3d.com/2018.4/Documentation/Manual/SL-Stencil.html
Answer by tahers_unity · Jun 08, 2021 at 07:35 PM
This is probably the way to do it haven't figure it out yet myself: https://docs.unity3d.com/2018.4/Documentation/Manual/SL-Stencil.html