Mask related utility class. This class provides masking-specific utility functions.
InheritanceMaskUtilities
Namespace: UnityEngine.UI Assembly: UnityEngine.UI.dll Syntaxpublic class MaskUtilities
Methods FindRootSortOverrideCanvas(Transform)
Find a root Canvas.
Declarationpublic static Transform FindRootSortOverrideCanvas(Transform start)
Parameters Type Name Description Transform start
Transform to start the search at going up the hierarchy.
Returns Type Description TransformFinds either the most root canvas, or the first canvas that overrides sorting.
GetRectMaskForClippable(IClippable)Find the correct RectMask2D for a given IClippable.
Declarationpublic static RectMask2D GetRectMaskForClippable(IClippable clippable)
Parameters Type Name Description IClippable clippable
Clippable to search from.
Returns Type Description RectMask2DThe Correct RectMask2D
GetRectMasksForClip(RectMask2D, List<RectMask2D>)Search for all RectMask2D that apply to the given RectMask2D (includes self).
Declarationpublic static void GetRectMasksForClip(RectMask2D clipper, List<RectMask2D> masks)
Parameters GetStencilDepth(Transform, Transform)
Find the stencil depth for a given element.
Declarationpublic static int GetStencilDepth(Transform transform, Transform stopAfter)
Parameters Type Name Description Transform transform
The starting transform to search.
Transform stopAfterWhere the search of parents should stop
Returns Type Description intWhat the proper stencil buffer index should be.
IsDescendantOrSelf(Transform, Transform)Helper function to determine if the child is a descendant of father or is father.
Declarationpublic static bool IsDescendantOrSelf(Transform father, Transform child)
Parameters Type Name Description Transform father
The transform to compare against.
Transform childThe starting transform to search up the hierarchy.
Returns Type Description boolIs child equal to father or is a descendant.
Notify2DMaskStateChanged(Component)Notify all IClippables under the given component that they need to recalculate clipping.
Declarationpublic static void Notify2DMaskStateChanged(Component mask)
Parameters Type Name Description Component mask
The object thats changed for whose children should be notified.
NotifyStencilStateChanged(Component)Notify all IMaskable under the given component that they need to recalculate masking.
Declarationpublic static void NotifyStencilStateChanged(Component mask)
Parameters Type Name Description Component mask
The object thats changed for whose children should be notified.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4