GUI Text box doesnt show up

I am trying to get some input from the user with a text box. I have the following:

                    xVel = GUI.TextField (Rect (140, 40, 120, 20), textFieldString);
                    yVel = GUI.TextField (Rect (140, 70, 120, 20), "Enter y vel");

But no text shows up on the screen. Any ideas?

Im not sure but maybe the string attached to should be the same which is in the GUI.Textfield Method.

Like

string text = "something";
text = GUI.TextField (Rect (140, 70, 120, 20), text);

It turned out that it was showing up, but only for a single frame. I moved it outside of a loop and all is well and good :)

the second argument of the TextField is the string that it will show and modify by keyboard events. then you should get the returned value and put it in the same variable. as a result of this the modified variable will be shown in the next frame in the TextField control.

var s : String;
function OnGUI()
{
s = GUI.TextField (Rect(0,0,100,20),s);
}