반응형
- 전체 수정
rectTransform.sizeDelta = new Vector2(width, height);
- Width 수정
private void SetWidth(float width)
{
rectTransform.sizeDelta = new Vector2(width, rectTransform.sizeDelta.y);
}
- Height 수정
private void SetHeight(float height)
{
rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, height);
}
반응형