April 2018
Beginner
468 pages
11h 7m
English
Using the Mask component allows you to restrict the visible area to a non-rectangular shape. However, if you want to restrict the visible area to a rectangular shape and don't want to use an image to restrict the visible area, you can use a Rect Mask 2D component.
The Rect Mask 2D component can be added to a UI Object by selecting Add Component | UI | Rect Mask 2D within the Inspector, as shown:
When a Rect Mask 2D component is added to a GameObject, the visibility of its children will be affected by the shape of its Rect Transform. An Image component is not required on the parent object for the Rect Mask 2D to function ...