📜  unity text display int - C# 代码示例

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

代码示例1
public Text text;
public int num;

void Update ()
{
  text.text = num.ToString();
}

//Make sure to set the text variable to a UI text inside Unity
//or run GetComponent<>() in the Start() or Awake() functions