Answers for "how to variable to text in unity"

C#
8

unity set text value

//Because the Text variable is public, 
//you will have to drag the Text box object onto the script in unity.
//So unity knows what text box to apply the script to.

public Text myText;
myText.text = "Enter the text value here!";

By: Barry Cox
Posted by: Guest on March-18-2020
0

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;
 }
Posted by: Guest on February-04-2020

Code answers related to "how to variable to text in unity"

C# Answers by Framework

Browse Popular Code Answers by Language