Component:Mask

From Resonite Wiki
Revision as of 05:29, 22 July 2024 by AmasterAmaster (talk | contribs) (Added a video.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
Mask component as seen in the Scene Inspector


The Mask component restricts the rendering of anything beneath it. It requires an Image component, text, arc, rectmesh, or anything that displays a graphic on the same slot. Only opaque areas of the graphic on the same slot will render the UIX below. This is also utilized in ScrollRect since it can mask anything outside of the scrolling viewport when using the component.

This can have issues with UIX's behind, since there are some rendering bugs with Unity.

There is a UIX Tutorial that use masking and ScrollRects to help you understand how masks work.

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
ShowMaskGraphic Bool Shows the graphic being used to do the masking for debug purposes.

Usage

This can be used for fancy cutout effects.

Examples

The ScrollRect section which is part of the UIX Canvas object created by the create new menu.

Here is ProbablePrime's tutorial on masking:

Related Components