Hello, just a quick question - can somebody tell me what is wrong here? when run the script Label shows “Points” “0” and, for example, “1” in the same time … counting is working but it still shows the “0” too
var points = "Points " ;
var count = 0;
function OnGUI ()
{
GUI.Label (Rect (25, 25, 100, 30), points + count);
}
function AddCount ()
{
count += 1;
}
function OnTriggerEnter (other : Collider)
{
AddCount ();
}