I don’t know why, but I cant drag the TextMeshPro component into my script. Is my script wrong, or is there something I need to to do that I am not awere of?
I want to add the “Text Input” into my "Score Text box
And here is my script:
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class Score : MonoBehaviour
{
public Transform player;
public TextMeshPro scoreText;
void Update()
{
scoreText.text = player.position.z.ToString(“0”);
}
}