Version: Unity 6.4 Alpha (6000.4)
Language : English
9-slice your sprite
Hide or reveal parts of a sprite with a mask

Sprite masks

Sprite masks either hide or reveal parts of a spriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
or group of sprites. The sprite maskA texture which defines which areas of an underlying image to reveal or hide. More info
See in Glossary
only affects objects using the Sprite RendererA component that lets you display images as Sprites for use in both 2D and 3D scenes. More info
See in Glossary
component.

Note: Sprite masks are not compatible with the Scriptable Render Pipeline (SRP) Batcher. If you enabled the SRP Batcher in the Universal Render Pipeline asset’s Rendering settings for GPU skinning and deformation, Unity falls back to using the CPU for skinningThe process of binding bone joints to the vertices of a character’s mesh or ‘skin’. Performed with an external tool, such as Blender or Autodesk Maya. More info
See in Glossary
and deformation and Dynamic BatchingAn automatic Unity process which attempts to render multiple meshes as if they were a single mesh for optimized graphics performance. The technique transforms all of the GameObject vertices on the CPU and groups many similar vertices together. More info
See in Glossary
.

Topic Description
Hide or reveal parts of a sprite with a mask Set mask interaction determines to hide or reveal parts of a sprite.
Create a sprite mask Add a new sprite mask GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
to the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
for hiding or revealing parts of a sprite.
Apply a mask to a sprite Assign a sprite to the sprite mask component, set the mask interaction, and control the mask’s effect.
Sprite mask reference Set a sprite as a mask, adjust the alpha cutoff for transparency, define the masking range, etc.
9-slice your sprite
Hide or reveal parts of a sprite with a mask