Making Text Boxes With Letters Appearing One At A Time

I’ve been trying to do something like this to tell the story in my game.

But I’ve been unable to figure out how to do it, mainly because I can’t think of any ways to make one letter appear on the screen at a time, rather than a character’s entire line.

So I must ask. How can I make text boxes that have letters appear one at a time instead of all at once? While I’m asking, links to any tutorials and such regarding things like that would be appreciated., since I’m fairly new to Unity.

The GUI stuff isn't really related here. How Fill a string one letter at a time ?

private var str: string;
function Start(){
    AnimateText("Pretty cool text");
}

function AnimateText(string strComplete){
    var i: int = 0;
    str = "";
    while( i < strComplete.Length ){
        str += strComplete[i++];
        yield WaitForSeconds(0.5);
    }
}

and C# (need to be explicitely inside a class, but I guess you already know that)

private string str;
void Start(){
    StartCoroutine( AnimateText("Pretty cool text") );
}

IEnumerator AnimateText(string strComplete){
    int i = 0;
    str = "";
    while( i < strComplete.Length ){
        str += strComplete[i++];
        yield return new WaitForSeconds(0.5F);
    }
}

Then the GUI part is obvious.

public class AnimatedText : MonoBehaviour {
public AnimatedText(){}

   public void animateText(string strComplete){
      int i = 0;
      string str = "";
      while(i < strComplete.Length){
         str += strComplete[i++];
         new WaitForSeconds(0.5f);
      }
   }
}