Ok, so on one script I use
var currentSanity : float = 0.0;
var maxSanity : float = 100.0;
var minSanity : float = 0.0;
function OnGUI()
{
GUI.Box(Rect(5,5,55,25), "Insanity");
GUI.Box(Rect(60,5,55,25), currentSanity.ToString("0") + "/" + maxSanity);
}
and on another I use
var timeGoing : float = 0.0;
function OnGUI()
{
GUI.Box(Rect(120,5,55,25), timeGoing);
}
The top one works, the second one doesn’t. It tells me that (UnityEngine.Rect, float) is a bad argument for UnityEngine.GUI.Box. Can anyone tell me how to fix this and make it work?