Class UGUIAnchorExtensions
public static class UGUIAnchorExtensions
- Inheritance
-
UGUIAnchorExtensions
Methods
GetAnchor(RectTransform)
Get the anchor of the RectTransform as a UGUIAnchor enum
public static UGUIAnchor GetAnchor(this RectTransform rectTransform)
Parameters
rectTransform
RectTransformRectTransform to get the anchor from
Returns
- UGUIAnchor
UGUIAnchor enum
Exceptions
- ArgumentOutOfRangeException
Thrown when the anchor is a custom value
SetAnchor(RectTransform, UGUIAnchor)
Set the anchor of the RectTransform as a UGUIAnchor enum
public static void SetAnchor(this RectTransform rectTransform, UGUIAnchor anchor)
Parameters
rectTransform
RectTransformRectTransform to set the anchor to
anchor
UGUIAnchorUGUIAnchor enum
Exceptions
- ArgumentOutOfRangeException
Thrown when the anchor is a custom value