how to change the size of a ui image through a script in unity code example
Example: how to change the size of ui in script unity
_image.rectTransform.sizeDelta = new Vector2(width, height);
_image.rectTransform.sizeDelta = new Vector2(width, height);