Skip to content

TextStudio3DInputField

ClassTextStudio.ThreeDTextStudio.3D
public sealed class TextStudio3DInputField : TextStudio3DControl, ITextStudio3DTextInputTarget

Provides a focusable spatial text field with caret, selection, content filtering, masking, validation, and submission.

public void Focus()

Acquires the global spatial text focus and exposes caret and selection state.

public void Blur()

Releases spatial text focus and applies the target’s blur validation.

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.

public void Insert(string value)

Inserts text at the current selection after applying content and length rules.

Parameters

Name Type
value System.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
public void Backspace()

Deletes the current selection or the preceding complete Text Studio text unit.

public void DeleteForward()

Deletes the current selection or the following complete Text Studio text unit.

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
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
public void SelectAll()

Selects the complete editable value.

public void Clear()

Clears editable content and publishes a value change while preserving focus.

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
public void Submit()

Raises submission for the current value and optionally releases focus.

protected override void RefreshLabel()

Allows a subclass to derive its displayed label from current semantic state.

protected override void PerformActivation()

Applies the subclass’s semantic activation after common interactability checks.

public TextStudio3DInputField()

public string Value { get; set; }

Returns

System.String

public string Placeholder { get; set; }

Returns

System.String

public bool UseBuiltInKeyboard { get; set; }

Returns

System.Boolean

public TextStudio3DInputContentType ContentType { get; set; }

Returns

TextStudio.ThreeD.TextStudio3DInputContentType

public int MaximumLength { get; set; }

Maximum number of complete Text Studio text units retained by the field.

Returns

System.Int32

public bool ReadOnly { get; set; }

Returns

System.Boolean

public bool IsFocused { get; }

Returns

System.Boolean

public static TextStudio3DInputField FocusedField { get; }

Returns

TextStudio.ThreeD.TextStudio3DInputField

public int CaretIndex { get; }

UTF-16 caret offset, always snapped to a complete text-unit boundary.

Returns

System.Int32

public int SelectionStart { get; }

Inclusive UTF-16 selection offset, always snapped to a complete text-unit boundary.

Returns

System.Int32

public int SelectionEnd { get; }

Exclusive UTF-16 selection offset, always snapped to a complete text-unit boundary.

Returns

System.Int32

public bool HasSelection { get; }

Returns

System.Boolean

public UnityEvent<string> OnValueChanged { get; }

Returns

UnityEngine.Events.UnityEvent{System.String}

public UnityEvent<string> OnSubmit { get; }

Returns

UnityEngine.Events.UnityEvent{System.String}

public UnityEvent<bool> OnFocusChanged { get; }

Returns

UnityEngine.Events.UnityEvent{System.Boolean}

public UnityEvent<Vector2Int> OnSelectionChanged { get; }

Returns

UnityEngine.Events.UnityEvent{UnityEngine.Vector2Int}