public void SetVerticalAlignment(VerticalAlignment alignment, bool setPivotAuto = true) { VerticalAlignment = alignment; if (setPivotAuto) { Pivot = new Vector2(Pivot.x, UiUtility.GetPivotPosition(alignment)); } }
public void SetHorizontalAlignment(HorizontalAlignment alignment, bool setPivotAuto = true) { HorizontalAlignment = alignment; if (setPivotAuto) { Pivot = new Vector2(UiUtility.GetPivotPosition(alignment), Pivot.y); } }