Hi my code is throwing an error with the textmesh. I can't call on it at all in my script and don't really know what's causing it?
Script Timer:
using TMPro;
using UnityEngine;
public class TimerText : MonoBehaviour
{
public TextMeshProUGUI timerText;
private float elapseTime;
// Update is called once per frame
void Update()
{
elapseTime += Time.deltaTime;
int min = Mathf.FloorToInt(elapseTime/60);
int sec = Mathf.FloorToInt(elapseTime % 60);
timerText.text = string.Format("{0:00}:{1:00}",min,sec);
}
}