Enables you to bind the return key within an InputField control to a button, also supports toggling the highlight of a control or field.
1 Overview
3 Methods
4 Usage
6 See also
If you want to enable a user to use the Return key on finishing entering in a field, the same as a web style control or Submit, this will enabling binding that action to a UI button (aka submit button). It also allows you to hind to a Highlight effect on the field (e.g. a red highlight for mandatory fields) which will enable/disable based on the submit action.
| Property | Description |
|---|---|
| Input Field | InputField listened to for Return key. |
| Target Button | Button invoked when Return is pressed. |
| Highlight Target | Optional GameObject toggled to show validation state. |
| Trigger Only When Input Valid | If enabled, only submits when InputField has text. |
| On Submit (event) | Event fired when Return key triggers submission. |
This component does not expose public methods beyond inherited behaviour.
Either add the “ReturnKeyTrigger” component to an existing UI InputField control, or create an Empty GameObject and add the “ReturnKeyTrigger” component using:
“Add Component -> UI -> Extensions -> Return Key Trigger”
This will automatically add an Input field if none is present.
tbc
N/A
Melang
N/A