Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make text show a variable in unity

 using UnityEngine.UI;  //its a must to access new UI in script
 public class YourClass : MonoBehaviour
 {
     public Text Score_UIText; // assign it from inspector
 void Start()
 {
    Score_UIText.text = yourscore_variable;
 }
 
PREVIOUS NEXT
Tagged: #text #show #variable #unity
ADD COMMENT
Topic
Name
9+5 =