- Home /
 
How to generate a typing animation in a Text UI
The idea is that, when the scene starts, I want the some text on the screen to be displayed in a "typing" fashion, kinda like those dialog boxes in the retro games.
This is the logic of how I believe I need to do it based on looking around google, but how do I apply this to a text object at the start of the scene?
 public Text dialogText;
 
 IEnumerator TypeSentence (string sentence)
         {
             dialogText.text = "";
             foreach(char letter in sentence.ToCharArray())
             {
                 dialogText.text += letter; 
                 yield return null; 
             }
         }
 
              
               Comment
              
 
               
              Your answer