A text field for typed input — names, answers, chat messages, prompts. The phone shows the native keyboard; submission happens via the built-in submit button or the Enter key. The host receives one submit event per submission.
C# factory
WidgetDefinitions.TextInput(
id: "answer",
positionX: 0.5f, positionY: 0.5f,
placeholder: "Type your answer…",
maxLength: 80,
submitLabel: "Send"
);
Wire format
Field
Type
Required
Notes
id
string
yes
type
"text_input"
yes
position_x, position_y
number
no
0..1 anchor.
placeholder
string
no
Hint text shown when empty.
max_length
number
no
Max characters. Default 140.
submit_label
string
no
Submit-button label.
Events
Event type
Payload
Fires when
submit
{ text: string }
Player taps Submit or presses Enter. The field clears on submit.
Example
manager.OnInput+= (player, evt) =>
{
if (evt.WidgetId=="answer"&&evt.EventType=="submit")