unity 2019.2 adjust size of rect transform code example Example: set width of rect transform unity rectTransform.sizeDelta = new Vector2(50, 50);