Sprite Masking
This section describes how to mask sprites.
Last updated
This section describes how to mask sprites.
Last updated
In Unity, the mask is a component that automatically crops the target sprite like a window.
Technically, you will need two game objects: the target object and the masking object.
You can add one of the game objects as a child if you want.
If you want to use the masking for your Avatar, you should use the Rigged Mask 2D Component instead of the Sprite Mask.
The Sprite Mask wouldnโt work on rigged sprites in Unity.
1. It is pretty straightforward. Make sure to select the GameObject that you want to use as a Mask
2. In the inspector, click the add component
button and select the Rigged Mask 2D
.
3. Tab the Fit to source sprite
button.
4. Thatโs it. Now you will see the source sprite is cropped.
It is not going to be working if the masking sprite has multiple bones
If you want to animate masking sprites, you might need to add the Sprite Resolver
5. There are several options that you could choose from in the Mask Interaction.
None
Visible inside Mask
Visible outside Mask