change height of rect transform unity 1

change height of rect transform unity

rectTransform.sizeDelta = new Vector2(50, 50);

Here is what the above code is Doing:
1. We create a new GameObject called “Button”
2. We add a RectTransform component to the Button
3. We set the position of the Button to (0, 0, 0)
4. We set the size of the Button to (50, 50)

Similar Posts