TextStudio3DInputField
public sealed class TextStudio3DInputField : TextStudio3DControl, ITextStudio3DTextInputTargetProvides a focusable spatial text field with caret, selection, content filtering, masking, validation, and submission.
Methods
Section titled “Methods”
Focus()
Section titled “Focus()”public void Focus()Acquires the global spatial text focus and exposes caret and selection state.
Blur()
Section titled “Blur()”public void Blur()Releases spatial text focus and applies the target’s blur validation.
SetValue(string, bool)
Section titled “SetValue(string, bool)”public bool SetValue(string value, bool notify)Filters and truncates a complete replacement value, preserves valid text-unit selection boundaries, and optionally raises change events.
Parameters
| Name | Type |
|---|---|
value |
System.String |
notify |
System.Boolean |
Returns
System.Boolean: True when the retained value changed.
Insert(string)
Section titled “Insert(string)”public void Insert(string value)Inserts text at the current selection after applying content and length rules.
Parameters
| Name | Type |
|---|---|
value |
System.String |
Append(string)
Section titled “Append(string)”public void Append(string value)Moves the caret to the end, clears the selection, and inserts text through the active content rules.
Parameters
| Name | Type |
|---|---|
value |
System.String |
Backspace()
Section titled “Backspace()”public void Backspace()Deletes the current selection or the preceding complete Text Studio text unit.
DeleteForward()
Section titled “DeleteForward()”public void DeleteForward()Deletes the current selection or the following complete Text Studio text unit.
MoveCaret(int, bool)
Section titled “MoveCaret(int, bool)”public void MoveCaret(int offset, bool extendSelection)Moves the caret by a signed text-unit offset and optionally extends the selection.
Parameters
| Name | Type |
|---|---|
offset |
System.Int32 |
extendSelection |
System.Boolean |
SetSelection(int, int)
Section titled “SetSelection(int, int)”public void SetSelection(int start, int end)Applies UTF-16 selection offsets, expands intersected text units, and places the caret at the supplied end.
Parameters
| Name | Type |
|---|---|
start |
System.Int32 |
end |
System.Int32 |
SelectAll()
Section titled “SelectAll()”public void SelectAll()Selects the complete editable value.
Clear()
Section titled “Clear()”public void Clear()Clears editable content and publishes a value change while preserving focus.
ProcessTextInput(string)
Section titled “ProcessTextInput(string)”public void ProcessTextInput(string input)Processes a built-in keyboard input stream, including backspace, return, and ordinary inserted characters.
Parameters
| Name | Type |
|---|---|
input |
System.String |
Submit()
Section titled “Submit()”public void Submit()Raises submission for the current value and optionally releases focus.
RefreshLabel()
Section titled “RefreshLabel()”protected override void RefreshLabel()Allows a subclass to derive its displayed label from current semantic state.
PerformActivation()
Section titled “PerformActivation()”protected override void PerformActivation()Applies the subclass’s semantic activation after common interactability checks.
Constructors
Section titled “Constructors”
TextStudio3DInputField()
Section titled “TextStudio3DInputField()”public TextStudio3DInputField()Properties
Section titled “Properties”
public string Value { get; set; }Returns
System.String
Placeholder
Section titled “Placeholder”public string Placeholder { get; set; }Returns
System.String
UseBuiltInKeyboard
Section titled “UseBuiltInKeyboard”public bool UseBuiltInKeyboard { get; set; }Returns
System.Boolean
ContentType
Section titled “ContentType”public TextStudio3DInputContentType ContentType { get; set; }Returns
TextStudio.ThreeD.TextStudio3DInputContentType
MaximumLength
Section titled “MaximumLength”public int MaximumLength { get; set; }Maximum number of complete Text Studio text units retained by the field.
Returns
System.Int32
ReadOnly
Section titled “ReadOnly”public bool ReadOnly { get; set; }Returns
System.Boolean
IsFocused
Section titled “IsFocused”public bool IsFocused { get; }Returns
System.Boolean
FocusedField
Section titled “FocusedField”public static TextStudio3DInputField FocusedField { get; }Returns
TextStudio.ThreeD.TextStudio3DInputField
CaretIndex
Section titled “CaretIndex”public int CaretIndex { get; }UTF-16 caret offset, always snapped to a complete text-unit boundary.
Returns
System.Int32
SelectionStart
Section titled “SelectionStart”public int SelectionStart { get; }Inclusive UTF-16 selection offset, always snapped to a complete text-unit boundary.
Returns
System.Int32
SelectionEnd
Section titled “SelectionEnd”public int SelectionEnd { get; }Exclusive UTF-16 selection offset, always snapped to a complete text-unit boundary.
Returns
System.Int32
HasSelection
Section titled “HasSelection”public bool HasSelection { get; }Returns
System.Boolean
OnValueChanged
Section titled “OnValueChanged”public UnityEvent<string> OnValueChanged { get; }Returns
UnityEngine.Events.UnityEvent{System.String}
OnSubmit
Section titled “OnSubmit”public UnityEvent<string> OnSubmit { get; }Returns
UnityEngine.Events.UnityEvent{System.String}
OnFocusChanged
Section titled “OnFocusChanged”public UnityEvent<bool> OnFocusChanged { get; }Returns
UnityEngine.Events.UnityEvent{System.Boolean}
OnSelectionChanged
Section titled “OnSelectionChanged”public UnityEvent<Vector2Int> OnSelectionChanged { get; }Returns
UnityEngine.Events.UnityEvent{UnityEngine.Vector2Int}