Note that Rich Text is intentionally not supported for editable Text controls the field will apply any Rich Text markup instantly when typed but the markup essentially "disappears" and there is no subsequent way to change or remove the styling.
The Text property of the Text control itself will change as the user types and the value can be retrieved from a script after editing. Having done this, you should also drag the object to the Input Field's Text property to enable editing. The Input Field script can be added to any existing Text control object from the menu ( Component > UI > Input Field). The event can send the current text content as a string type dynamic argument. The event can send the current text content as a string type dynamic argument.Ī UnityEvent that is invoked when the user finishes editing the text content either by submitting or by clicking somewhere that removes the focus from the Input Field. Note that this only works on iOS devices.|Ī UnityEvent that is invoked when the text content of the Input Field changes. |* Hide Mobile Input* (iOS only) ||Hides the native input field attached to the onscreen keyboard on mobile devices. |* Selection Color* ||The background color of the selected portion of text.| |* Caret Blink Rate* ||Defines the blink rate for the mark placed on the line to indicate a proposed insertion of text.| Note that this ‘empty' graphic still displays even when the Input Field is selected (that is when there is focus on it). |* Placeholder* ||This is an optional ‘empty’ Graphic to show that the Input Field is empty of text. User can use a newline by pressing the return key.| | | Multi Line Newline |Allows text to use multiple lines. | | Multi Line Submit |Allows text to use multiple lines. | | Single Line |Only allows text to be on a single line.| |* Line Type* ||Defines how text is formatted inside the text field.| | | Custom |Allows you to customise the Line Type, Input Type, Keyboard Type and Character Validation.| Only allows only whole numbers to be entered.| | | Pin |Conceals the characters inputed with an asterisk. | | Password* |Conceals the characters inputed with an asterisk. periods/baseline dots cannot be entered next to each other. | | Email Address |Allows you to enter an Alphanumeric string consisting of a maximum of one sign. Note that the user can circumvent the capitalization rules using the Delete key.| | | Name |Automatically capitalizes the first letter of each word. | | Alphanumeric |Allow both letters and numbers. | | Decimal Number |Allow only numbers and a single decimal point to be entered.|
| | Integer Number |Allow only whole numbers to be entered.| | | Autocorrected |The autocorrection determines whether the input tracks unknown words and suggests a more suitable replacement candidate to the user, replacing the typed text automatically unless the user explicitly overrides the action.| | | Standard |Any character can be entered.| |* Content Type* ||Define the type(s) of characters that your input field accepts| |* Character Limit* ||The value of the maximum number of characters that can be entered into the input field.| The initial text placed in the field before editing begins. |* TextComponent* ||A reference to the Text element used as the contents of the Input Field| |* Navigation* || Properties that determine the sequence of controls. |* Transition* || Transitions are used to set how the input field transitions when Normal, Highlighted, Pressed or Disabled. Like the other interaction controls, it's not a visible UI element in itself and must be combined with one or more visual UI elements in order to be visible.Ī boolean that determines if the Input Field can be interacted with or not. An Input Field is a way to make the text of a Text Control editable.