How to mask UI elements in Unity

--

How to mask UI elements in Unity.

Create an Image component add a source sprite, then duplicate this image and rename it as a mask. Take the Image and make it a child of the mask Image.

Select the mask Image and add the mask component to the hierarchy.

Now move the Image component

Another way to make a Masks UI element in Unity is to add the Rect Mask 2D component on the mask game object and disable the image component/remove it on the mask game Object.

See you in the next one.

--

--

Suleiman Abdullah
Suleiman Abdullah

Written by Suleiman Abdullah

Self taught Unity Developer, who is passion about making games ,and he loves Math For Game Development

No responses yet