Timer in unity

Video Tutorial

Ask or Request for anything you want in the comments below 🙂

using UnityEngine;
using UnityEngine.UI;

public class Timer : MonoBehaviour
{
public Text txt;
public bool CronoManager = false;
public float timer;

void Update()
{
if (CronoManager)
{
timer += Time.deltaTime;

string seconds = (timer % 60).ToString("f2");
string minutes = ((int)timer / 60).ToString();

txt.text = minutes + "M " + seconds + "s";

}
}
}