InputFieldandTMP_InputField, sharing one editing core:- typing with validation by content type (integer, decimal, alphanumeric, name, email; TMP's digit, regex and custom validators) and the character limit;
- Backspace and Delete, and moves by character, word, line and to start or end, with Shift selecting;
- select all, copy, cut and paste (an in-process clipboard), passwords, multi-line, and submit and cancel (restoring the text);
- activation at the end of the frame, selecting all, and focus moving between fields (
onEndEdit); - the label refreshed as Unity refreshes it, scrolled to keep the caret in view;
- mouse caret placement and drag selection, and a drawn caret (blinking) and selection.
DropdownandTMP_Dropdown:- the list is a copy of the template, with an item per option, sorted on top (30000);
- a blocker closes it; picking an item sets the value; it fades out and is destroyed.
DefaultControlsandTMP_DefaultControlsbuild every standard control with Unity's names, sizes and wiring.- Text input:
Input.inputString, a per-frame IMGUIEventqueue (Event.PopEvent,Event.KeyboardEvent),GUIUtility.systemCopyBuffer, andKeyboard.onTextInput;- the player window's typed characters, and MCP's
play_steptextinput.
- Also:
Transformsibling order (GetSiblingIndex,SetSiblingIndex,SetAsFirstSibling,SetAsLastSibling) andObject.hideFlags;GetComponentInChildrensearching below inactive objects as Unity does;- cloning keeps RectTransforms (instantiating UI was broken), and cloned UnityEvents get fresh listener lists.
- A new
ui_inputscenario recorded in Unity checks the following, and matches in both runs:- editing through
ProcessEvent(caret, selection, deletes, validation, limits, multi-line, cancel), the label's refresh timing, and the order of activation and end-edit events; - TMP editing, and dropdown options, captions, the shown list, the blocker and picking. 35 scenarios pass.
- editing through
- An MCP e2e test clicks an input field, types, deletes and submits.
- Not yet: IME composition, touch keyboards, the OS clipboard, rich text editing in TMP fields, and TMP's scrollbar and multi-select dropdowns.
- Next: texture maps for PBR materials (normal, metallic, occlusion, emission) and the scene's RenderSettings ambient.
Phase 5 · Slice 9 ·