Question by
tb20042004 · Dec 28, 2015 at 12:19 PM ·
script.
How do i make a timer that shows up on screen?
OK so I am working on a plat-former and I am having trouble displaying a timer on screen if you could tell me how to make one in c# that would be AMAZING!
Comment
Answer by SoloDeveloper · Dec 29, 2015 at 04:13 AM
using UnityEngine;
using System.Collections;
public class Timer : MonoBehaviour {
void OnGUI(){
float theTime = Time.deltaTime;
GUI.Label (new Rect (0,0,250,250),"Time: " + theTime );
}
}
the timer should be on the left top of screen i think dis works, didnt check
Your answer
Follow this Question
Related Questions
Line segment from a Gameobject to nearest vertex 0 Answers
How can I get the game object that a particle trigger detects? 0 Answers
can i get help please 0 Answers
Referencing between Scenes,Accessing data only from main scene 0 Answers
How To Find GameObject From List And Add To Player List 0 Answers