- Home /
 
 
               Question by 
               KunkkaHere · Jan 16, 2013 at 11:31 AM · 
                scorecountdown3d text  
              
 
              Update 3D text in realtime? (Countdown watch)
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);
             }
         }
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Graham-Dunnett · Jan 16, 2013 at 11:40 AM
Make a GameObject that has the TextMesh component.
Does that update in realtime so that I can display the score on the textmesh?
Your answer