Version: 2023.1
Language : English
Mask
UI Effect Components

RectMask2D

A RectMask2D is a masking control similar to the MaskCan refer to a Sprite Mask, a UI Mask, or a Layer Mask More info
See in Glossary
control. The mask restricts the child elements to the rectangle of the parent element. Unlike the standard Mask control it has some limitations, but it also has a number of performance benefits.

Description

A common use of a RectMask2D is to show small sections of a larger area. Using the RectMask2D to frame this area.

The limitations of RectMask2D control are:

  • It only works in 2D space
  • It will not properly mask elements that are not coplanar

The advantages of RectMask2D are:

  • It does not use the stencil buffer
  • No extra draw calls
  • No material changes
  • Fast performance

RectMask2D

Mask
UI Effect Components
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961