Countdown timer in Unity C script
<p>I have been working on a Unity project for sometime, I have a timer which currently counts down from around 30 minutes, however I want this to be 4 hours counting down. here is my code:</p>

<pre><code>seconds = Mathf.CeilToInt (gameTimer - Time.timeSinceLevelLoad) % 60;
        minutes = Mathf.CeilToInt (gameTimer - Time.timeSinceLevelLoad) / 60; 
    }

    if (seconds == 0 &amp;&amp; minutes == 0) {
        chestfree.gameObject.SetActive(true);
        checker = 2;
    }

    remainingTime = string.Format("{0:00} : {1:00}", minutes, seconds); 
    if (seconds != 0 &amp;&amp; minutes != 0) {
        h.text = remainingTime.ToString ();
    } else {

        h.text = "Get";
    }
</code></pre>

<p>So you can see I have seconds and minutes in there, I tried to change the / 60 after minutes to 19 and when it ran it displayed 240 minutes which was fine, but the countdown seems to be very odd, minutes go down after around 20 seconds so I know thats not the right way to do it!</p>

<p>Can anyone explain to me how to add in hours or how I can make the minutes count down from 240 minutes?</p>

<p>Many thanks!</p>