C# Class UnityEngine.UI.MaskUtilities

Mask related utility class.

ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
FindRootSortOverrideCanvas ( Transform start ) : Transform

Find a root Canvas.

GetRectMaskForClippable ( IClippable clippable ) : RectMask2D

Find the correct RectMask2D for a given IClippable.

GetRectMasksForClip ( RectMask2D clipper, List masks ) : void
GetStencilDepth ( Transform transform, Transform stopAfter ) : int

Find the stencil depth for a given element.

IsDescendantOrSelf ( Transform father, Transform child ) : bool

Helper function to determine if the child is a descendant of father or is father.

Notify2DMaskStateChanged ( Component mask ) : void

Notify all IClippables under the given component that they need to recalculate clipping.

NotifyStencilStateChanged ( Component mask ) : void

Notify all IMaskable under the given component that they need to recalculate masking.

Method Details

FindRootSortOverrideCanvas() public static method

Find a root Canvas.

public static FindRootSortOverrideCanvas ( Transform start ) : Transform
start UnityEngine.Transform Search start.
return UnityEngine.Transform

GetRectMaskForClippable() public static method

Find the correct RectMask2D for a given IClippable.

public static GetRectMaskForClippable ( IClippable clippable ) : RectMask2D
clippable IClippable
return RectMask2D

GetRectMasksForClip() public static method

public static GetRectMasksForClip ( RectMask2D clipper, List masks ) : void
clipper RectMask2D
masks List
return void

GetStencilDepth() public static method

Find the stencil depth for a given element.

public static GetStencilDepth ( Transform transform, Transform stopAfter ) : int
transform UnityEngine.Transform
stopAfter UnityEngine.Transform
return int

IsDescendantOrSelf() public static method

Helper function to determine if the child is a descendant of father or is father.

public static IsDescendantOrSelf ( Transform father, Transform child ) : bool
father UnityEngine.Transform The transform to compare against.
child UnityEngine.Transform The starting transform to search up the hierarchy.
return bool

Notify2DMaskStateChanged() public static method

Notify all IClippables under the given component that they need to recalculate clipping.

public static Notify2DMaskStateChanged ( Component mask ) : void
mask UnityEngine.Component
return void

NotifyStencilStateChanged() public static method

Notify all IMaskable under the given component that they need to recalculate masking.

public static NotifyStencilStateChanged ( Component mask ) : void
mask UnityEngine.Component
return void