RectMask2D
A RectMask2D is a masking control similar to the Mask 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
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information