UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"display game time in seconds"
public class TimeDisplay : MonoBehaviour { public Text timeText; void DisplayTime(float timeToDisplay) { float minutes = Mathf.FloorToInt(timeToDisplay / 60); float seconds = Mathf.FloorToInt(timeToDisplay % 60); timeText.text = string.Format("{0:00}:{1:00}", minutes, seconds); } }