Hey there I am working on a project where I include a timer, but it seems that it won’t stay at the same place, dependin on the game’s resolution. I would like to stay on a specific place on the screen, how is it possible? Thanks for you advices.
Here is the timer’s script, along with how I determine its position:
var startTimer: int;
var minutes : int;
var seconds : int;
var style : GUIStyle;
function Start() {
startTimer = Time.time;
}
function Update() {
var time = Time.time - startTimer;
minutes = time / 60;
seconds = time % 60;
}
function OnGUI() {
GUI.Label (Rect (850, 800, 200, 20), String.Format ("{0:0}:{1:00}", minutes, seconds), style);
}