Exemplo n.º 1
0
        public void OnWidthPaddingChange(Entity entity)
        {
            var rectTrans = entity.GetTransform().GetComponent <RectTransform>();
            var pandding  = UIManagerComponent.Instance.WidthPadding;

            rectTrans.offsetMin = new Vector2(pandding * (1 - rectTrans.anchorMin.x), 0);
            rectTrans.offsetMax = new Vector2(-pandding * rectTrans.anchorMax.x, 0);
        }