void OnGUI()
{
TimeSpan timer = new TimeSpan(1, 1, 50);
TimeSpan deltaTimeSpan = TimeSpan.FromSeconds(Time.deltaTime);
timer = timer.Subtract(deltaTimeSpan);
string t = "Time left: " + timer.ToString("hh\\:mm\\:ss");
EditorGUILayout.LabelField("Next: ", t);
}
The problem is that ToString
have not arguments. I’m getting error on ToString:
No overload for method ‘ToString’ takes 1 arguments
What I want to do is to display a simple countdown timer with hours minutes seconds milliseconds on a LabelField
. But can’t do it.