text box and button won't display

hey guys, can you help me out please… i have the following code, which should to the best of my knowledge, display a button, and once it is clicked, a method call thing() [its a temporary name haha] should be called. My problem is this the print(“HELLO”) is run, but the text box and secondary button never appear for some reason. Any help would be greatly apretiated. the following is the code.
var word: String;

function OnGUI(){

if (GUI.Button(Rect(20,20,100,20), "Import Image")){




function thing(){


word=GUI.TextField (Rect (20, 50, 200, 50), word);	

if (GUI.Button(Rect(20, 80, 100,20), "SUBMIT")){





That´s because they appear for a very short period once you click your other button that call thing() function. Put your textfield call outside that function and inside OnGUI() and it will display.

i know but i only want to see the text field after the button has been clicked…