1.TextMeshPro
添加引用:using TMPro;
获取对象:
-
(GameObject).GetComponent<TMP_Text>().text = (String)
2. Button
获取按钮文本:
添加引用:using TMPro;
Button button = table.transform.Find(name).GetComponent<Button>();
button.GetComponentInChildren<TMP_Text>().text.ToString()
3. 添加控件:
添加需要的控件在 GameObject 中并没有找到,或者 选中指定控件,在 Add Component 中查找很麻烦的话,可以直接在 Add Component 的弹出框中的 的输入框中 输入需要的控件名称,eg:Vertical Layout Group
4. 字体模糊
在添加字体 Window -> TextMeshPro -> Font Asset Creator
Atlas Resolution 选取不要太大 在 Render Mode 选择 SMOOTH 会好一些