Hello.
Is it possible to update a 3D in real time? I am going to have a countdown clock that is displayed by this text. I have a script ready that is for GUI text, but I do now want that, I want a 3D text. How do I accomplish this? Thanks.
Here is the code:
var score = 0;
var scoreText = "Score: 0";
var mySkin : GUISkin;
function OnTriggerEnter( other : Collider ) {
Debug.Log("OnTriggerEnter() was called");
if (other.tag == "Player") {
score += 1;
scoreText = "Score: 0" + score;
Debug.Log("You have been hit");
}
}
function OnGUI () {
var style = new GUIStyle("label");
style.fontSize = 30 ;
GUI.color=Color.green;
GUI.skin = mySkin;
GUI.Label (Rect (900, 700 , 500, 200), scoreText.ToString()); }
function Update(){
if( score == 100){
Application.LoadLevel(0);
}
}