// Make a text field where the user can enter a password. public static string PasswordField(string password, char maskChar, int maxLength, GUIStyle style, params GUILayoutOption[] options) { GUIContent t = GUIContent.Temp(GUI.PasswordFieldGetStrToShow(password, maskChar)); return(GUI.PasswordField(GUILayoutUtility.GetRect(t, GUI.skin.textField, options), password, maskChar, maxLength, style)); }