RoundedRectMask2D Class

Definition

A 2D rounded rectangular mask that allows for clipping / masking of areas outside the mask. Constraints:

  • Material instancing must be controlled by the user. i.e shared materials may be effected by RoundedRectMask2D.
  • RoundedRectMask2D only work with Graphics Tools/Canvas/... shaders.
  • Nested RoundedRectMask's work but are not advised since they will not consider grandparent, great grandparent, etc. radii.
  • Plus, same constraints as RectMask2D.
public class RoundedRectMask2D : Microsoft.MixedReality.GraphicsTools.RectMask2DFast
type RoundedRectMask2D = class
    inherit RectMask2DFast
Public Class RoundedRectMask2D
Inherits RectMask2DFast
Inheritance
UnityEngine.UI.RectMask2D
RoundedRectMask2D

Constructors

RoundedRectMask2D()

Fields

independentRadii
radii
RadiiPropertyName
RoundedIndependentKeyword
RoundedKeyword

Properties

ForceClip

Checks if all clip/mask targets needs to be re-culled. Setting this to true will force all clip/mask targets to update their culling state next frame.

(Inherited from RectMask2DFast)
IndependentRadii

False if the rounded rect has the same radii for all four corners, true if they are all different.

Radii

If IndependentRadii is true, the four corner radii of the rounded rect. (x: top left, y: top right, z: bottom left, w: bottom right) If IndependentRadii is false, the x value is used for all four corners of the rounded rec. (x: all, y: unused, z: unused, w: unused)

Methods

OnCanvasHierarchyChanged() (Inherited from RectMask2DFast)
OnDidApplyAnimationProperties() (Inherited from RectMask2DFast)
OnEnable() (Inherited from RectMask2DFast)
OnSetClipRect(MaskableGraphic)

enables shader keywords/properties based on the RoundedRectMask2D state.

OnTransformParentChanged() (Inherited from RectMask2DFast)
OnValidate() (Inherited from RectMask2DFast)
PerformClipping()

Lazy initialize shader IDs.

Applies to