0
怎麼了。Unity UI文本框動態高度。我如何根據文字量擴大它?
我正在實例化一個文本框gameobject。 然後用文字填滿。
任何使文本框高度動態變化的方法?
GameObject reply1 = Instantiate(replyText, transform.position,
transform.rotation);
reply1.transform.SetParent(textArea.transform, false);
Text reply1text = reply1.GetComponent<Text>();
reply1text.text = gameRounds[roundCount].reply[0];
寬度很好,不需要改變它。