How to unfocus GUITextField?

I use this script to set focus on textfield and send message:

GUI.SetNextControlName ("MyTextField");
		currentMessage = GUI.TextField (new Rect (0, Screen.height - 20, 175, 20), currentMessage);
		if (GUI.Button (new Rect (200, Screen.height - 20, 75, 20), "Send") || Event.current.keyCode == KeyCode.Return) {
			SendMessage();
		}
		


		if (Event.current.keyCode == KeyCode.Return)
			GUI.FocusControl ("MyTextField");

I tried adding, GUI.FocusControl(null) but it didnt help. I need it to unfocus that textfield after the message is sent.Basicly it just stays focused after sending the message.

This appears to have been asked before. Found this other answer which may be helpful: unfocus text field

I have updated your code as shown below. Basically, you can create an invisible dummy control and set the focus to that.

GUI.SetNextControlName ("DummyControl");
GUI.Button (new Rect (0, 0, 0, 0), "", GUIStyle.none);
GUI.SetNextControlName ("MyTextField");
currentMessage = GUI.TextField (new Rect (0, Screen.height - 20, 175, 20), currentMessage);
if (GUI.Button (new Rect (200, Screen.height - 20, 75, 20), "Send") || Event.current.keyCode == KeyCode.Return) {
	SendMessage ("yourMethodName");
	GUI.FocusControl ("DummyControl");
}