Currently I’m working on a Multiplayer FPS game that is themed around Christmas. I felt like I could spice up my project a bit, by adding a Christmas Countdown timer. (Pretty much just something that says how many days, hours, minutes, and seconds until Christmas day). How would I go about doing that? Here’s what my script currently looks like:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class CountdownTimer : MonoBehaviour
{
[SerializeField] TMP_Text CountdownText;
void Update()
{
//Gets users current time from computer
string time = System.DateTime.UtcNow.ToLocalTime().ToString("dd HH mm ss");
print(time);
CountdownText.text = time;
}
}
Thanks,