- Home /
How to create multiple cutout masks on a UI element?
Hello, I am attempting to overlay multiple masks that cutout the sprite behind it for my UI. I used the strategy on this video but unfortunately it only cuts-out the subsection of both of my masking sprites instead of the union.
Here is the code I found from the tutorial:
public class CutoudMaskUI : Image { public override Material materialForRendering { get { Material material = new Material(base.materialForRendering); material.SetInt("_StencilComp",(int)CompareFunction.NotEqual); return material; } } }
Ex: I am trying to get something like instead I am getting
Thank you for your time :)
Comment