How to get text mesh to get updated during runtime

What the title above says :P. I’m using this for a username so when you type in the name the players name is updated.

#pragma strict

var tm : TextMesh = gameObject.GetComponent(TextMesh);
var username : String;

function Start () {
tm.text = username;
}

Did you mean to put tm.text = username; in Start()? I don’t know since I can’t see the rest of your code, but it might work in Update().