I watched a tutorial on YT (From unity 4) of making a score in a simple game, i writed a short script (Like in this tutorial) = #pragma strict
static var currentScore : int = 0;
var offsetY : float = 40;
var sizeX : float = 100;
var sizeY : float = 25;
function OnGUI ()
{
GUI.Box (new Rect (Screen.height*0.5, Screen.width/2-sizeX/2, offsetY, sizeX, sizeY), "Score: " + currentScore);
}
Then I got an error = Assets/GameMaster.js(11,18): BCE0024: The type 'UnityEngine.Rect' does not have a visible constructor that matches the argument list '(float, float, float, float, float)'.
Please solve my problem (:
Photo of script: [Click](http://imgur.com/jtyMciZ)
↧