示例#1
0
        public void SetVerticalAlignment(VerticalAlignment alignment, bool setPivotAuto = true)
        {
            VerticalAlignment = alignment;

            if (setPivotAuto)
            {
                Pivot = new Vector2(Pivot.x, UiUtility.GetPivotPosition(alignment));
            }
        }
示例#2
0
        public void SetHorizontalAlignment(HorizontalAlignment alignment, bool setPivotAuto = true)
        {
            HorizontalAlignment = alignment;

            if (setPivotAuto)
            {
                Pivot = new Vector2(UiUtility.GetPivotPosition(alignment), Pivot.y);
            }
        }