Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity text display int

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
 
PREVIOUS NEXT
Tagged: #unity #text #display #int
ADD COMMENT
Topic
Name
6+2 =