Getting a error: error CS0029: Cannot implicitly convert type ‘string’ to ‘TMPro.TextMeshProUGUI’
How can I score update by scoreValue
public static float scoreValue;
public TextMeshProUGUI score;
// Start is called before the first frame update
void Start()
{
score = GetComponent<TextMeshProUGUI>();
}
// Update is called once per frame
void Update()
{
scoreValue += Time.deltaTime;
Debug.Log(scoreValue);
score = scoreValue.ToString();
}