I want to show player points in a Text box. How can i make that using a script? I put the default text as “0” and i want to change it to “1”,“2”,…“n”. I tryied this:
public class SomeClass : MonoBehaviour
{
Text myText;
public void Start()
{
myText = GetComponent<Text>();
}
public void UpdateText()
{
mytext.text = "Some new string value";
}
}
but I get this error: The type or namespace name `Text’ could not be found. I am using the latest version of Unity