UI Elements Instantly Breaks Sprite Masks (Unity 2D)
Currently have a sprite mask, covering a rectangular area within my Canvas. Inside the mask, I've put sprites and set their Mask Interaction property to "Visible Within Mask". This works perfectly, showcasing sprites within the mask, and masking all sprite visuals beyond the mask.
The issue is that any instance of a UI element inside the mask's area, breaks the mask, and thereby completely breaks the setup. Is there any solution to prevent UI from breaking the sprite mask?
Similar Issue - https://forum.unity.com/threads/ui-masks-not-working.504874/
Answer by dokisoft · Mar 19, 2019 at 08:31 PM
Utilizing a canvas component on the parent container fixed the issue, and allowed sprites and UI to coexist
Your answer
![](https://koobas.hobune.stream/wayback/20220612184622im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Custom shader does not update if masked, 1 Answer
player and other game objects appearing over the UI 1 Answer
Setting Sprite Rendered on UI 0 Answers
How to mask a Sprite Mask? 0 Answers
Fading groups of sprites cheaply? 0 Answers