Input Field Enter Submit
Submits an InputField when Enter is pressed and refocuses for the next entry.
Controls demonstrated:
Input Field Enter Submit
Overview
This scene demonstrates the Input Field Enter Submit utility, which fires a submit event from a standard Unity InputField when the Enter key (or numeric keypad Enter) is pressed. Use it for search boxes, chat input, command prompts, or any form-like field where Enter should commit the text.
Controls Featured
- Input Field Enter Submit — the scene attaches the component to an InputField so pressing Enter raises its
EnterSubmitevent with the current text.
Scene Setup
- Add the UI Extensions Samples sample to your project (open the package in the Unity Package Manager and import UI Extensions Samples), or copy
Examples~/InputFieldEnterSubmit/into your project’sAssets/folder. - Open the
InputFieldEnterSubmitDemoexample scene in that folder. - Press Play.
What to Expect
The scene presents an InputField with the Input Field Enter Submit component attached. As you type and press Enter, the component invokes its EnterSubmit event, passing the current text. Depending on the Defocus Input setting, the field either keeps focus for further input or releases focus after submission.