Unity背景自適應文字高度

Text Lbl = gameObject.GetComponent<Text>(); RectTransform RT = gameObject.GetComponent<RectTransform>(); RT.sizeDelta = new Vector2(RT.sizeDelta.x,RT.sizeDelya.y + Lbl.preferredHeight);
相關文章
相關標籤/搜索