InputField
Optional feature
InputField is part of UI Controls. A build includes it only when a scene, prefab or script uses it — see Feature cropping.
From a script
ts
import { InputFieldComponent } from "mmpx";
const inputField = this.entity.TryGetComponent(InputFieldComponent);Full API: InputFieldComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Interactableinteractable | boolean | true | |
Texttext | string | — | |
Placeholderplaceholder | string | "Enter text..." | |
Text LabeltextLabel | Entity | — | The Text entity that shows the value |
Placeholder LabelplaceholderLabel | Entity | — | The Text entity shown while the field is empty |
Content TypecontentType | "standard" | "integer" | "decimal" | "alphanumeric" | "email" | "password" | "pin" | "standard" | What the field accepts — also picks the mobile keyboard |
Multilinemultiline | boolean | false | Enter adds a line instead of submitting |
Character LimitcharacterLimit | number (0 … ∞) | 0 | 0 = no limit |
Return KeyreturnKey | "default" | "done" | "go" | "next" | "search" | "send" | "default" | The return key label on mobile keyboards |