Basically I have a loop in the start () function like so:
var add = ["T", "e"];
var stop = 1.0;
function Start() {
var myTextMesh = (GetComponent(TextMesh) as TextMesh);
myTextMesh.text = "";
for (i = 0; i < add.length; i++)
{
myTextMesh.text += add[i];
yield WaitForSeconds (stop);
}
}
I’m trying to add the letters, “T” and “e” using a loop, but whenever I start the game, it just adds “T”.
After Debug.Logging, I removed the yield statement, and it added both letters perfectly.
Does anyone know why this yield statement is acting up?
Thanks in advance!