Move keyboard focus to a named text field and begin editing of the content.
// When pressed the button, selects the "username" Textfield. var username : String = "username"; var pwd : String = "a pwd"; function OnInspectorGUI () { // Set the internal name of the textfield GUI.SetNextControlName ("MyTextField"); // Make the actual text field. username = EditorGUI.TextField (Rect (10,10,100,20), username); pwd = EditorGUI.TextField (Rect (10,40,100,20), pwd); // If the user presses this button, keyboard focus will move. if (GUI.Button (Rect (10,70,80,20), "Move Focus")) EditorGUI.FocusTextInControl ("MyTextField"); }