Answer by Nomabond
Hi Nocturnal, On line 13 you are using GetComponent(); but the actual component you are trying to find is a Text (notice the capital 'T' ). It would be much easier for you though if you set your Text...
View ArticleAnswer by deLord
I found Nocturnals timer a bit crude, so I came up with this: using System.Collections; using UnityEngine.UI; public class Countdown : MonoBehaviour { public float timeLeft = 300.0f; public bool stop =...
View ArticleAnswer by U_Ku_Shu
float _countDownTimeLeft = 30.0f; bool _timerIsGoing; void Update() { UpdCountDown(); } private void UpdCountDown() { if (_timerIsGoing && _countDownTimeLeft > 0) { _countDownTimeLeft -=...
View ArticleAnswer by Loomabox
Please, need help. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CountdownTimer : MonoBehaviour { float timeLeft = 300.0f; public...
View ArticleAnswer by naveedabbas
public class Timercontroler : MonoBehaviour { public Text timer; float timeleft=300f; // Use this for initialization void Start () { } // Update is called once per frame void Update () { timeleft -=...
View ArticleAnswer by Maltory
So this is the super basic timer I am currently working on. I am using it for a world space UI so.... But hopefully it works for all of you guys. using System.Collections; using...
View ArticleAnswer by MyrDovg
float totalTime = 120f; //2 minutes private void Update() { totalTime -= Time.deltaTime; UpdateLevelTimer(totalTime ); } public void UpdateLevelTimer(float totalSeconds) { int minutes =...
View ArticleAnswer by creatorOFgravityracer
GravityGamezProd HERES THE FIXZ TO ALL WHO IS STILL LOOKING AT THIS COUNTDOWN SCRIPT ON UNITY 5 *TODAYS DATE 12/9/17 YOUR WELCOME using UnityEngine; using UnityEngine.UI; using System.Collections;...
View Article