C# 如何通过脚本为粗体按钮文本加下划线(Unity3d)
如何在Unity3D中通过脚本为UI按钮文本加下划线和粗体?我正在根据游戏中所需的数字动态创建按钮。您可以使用富文本标记:C# 如何通过脚本为粗体按钮文本加下划线(Unity3d),c#,unity3d,button,uibutton,underline,C#,Unity3d,Button,Uibutton,Underline,如何在Unity3D中通过脚本为UI按钮文本加下划线和粗体?我正在根据游戏中所需的数字动态创建按钮。您可以使用富文本标记: <u>underline text</u> <b>bold text</b> <u><b>underline bold text</b></u> 给文本加下划线 粗体文本 粗体下划线 团结一致: textfield.text = "<u><b>he
<u>underline text</u>
<b>bold text</b>
<u><b>underline bold text</b></u>
给文本加下划线
粗体文本
粗体下划线
团结一致:
textfield.text = "<u><b>hello world</b></u>";
textfield.text=“你好世界”;
您可以使用富文本标记:
<u>underline text</u>
<b>bold text</b>
<u><b>underline bold text</b></u>
给文本加下划线
粗体文本
粗体下划线
团结一致:
textfield.text = "<u><b>hello world</b></u>";
textfield.text=“你好世界”;
对不起,我应该提到,我正在通过数组访问按钮:按钮[I].getComponentChildren().color=color.red代码>。所以我猜我不能以这种方式使用富文本标记?你可以:buttons[I].getComponentChildren().text=“bold text”代码>对不起,我应该提到,我是通过数组访问按钮的:按钮[I].getComponentChildren().color=color.red代码>。所以我猜我不能以这种方式使用富文本标记?你可以:buttons[I].getComponentChildren().text=“bold text”代码>