Unity背景自适应文字高度

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