📜  统一将浮点值添加到 ui 文本 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:45.491000             🧑  作者: Mango

代码示例1
//Attach your Text Object in the Inpsector
public Text goldUi;
float gold = 3;

goldUi.text = "You have" + gold.ToString("00") + "gold";
//This will display: You have 3 gold