Hi... I have this script
var score = 0;
var scoreText = "Score: 0";
function OnTriggerEnter( other : Collider ) {
Debug.Log("OnTriggerEnter() was called");
if (other.tag == "Coin") {
Debug.Log("Other object is a coin");
score += 5;
scoreText = "Score: " + score;
Debug.Log("Score is now " + score);
Destroy(other.gameObject);
}
}
function OnGUI () {
GUI.Label (Rect (10, 10, 100, 20), scoreText.ToString()); }
I have a GuiSkin and i want the things in the script like "Score: " to take the font, color etc from my GuiSkin. What i have to put in my code to fix that? Please correct it! Thank you.