Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ITextSelection

Interface to access a TextElement selection and cursor information This interface is not meant to be implemented explicitly as its declaration might change in the future.
Read time 1 minuteLast updated 9 days ago

Definition

public interface ITextSelection

Properties

Property

Description

cursorIndexThis is the cursor index in the text presented.
cursorPositionThe position of the text cursor inside the element.
doubleClickSelectsWordControls whether double-clicking selects the word under the mouse pointer.
isSelectableReturns true if the field is selectable.
selectAllOnFocusControls whether the element's content is selected upon receiving focus.
selectAllOnMouseUpControls whether the element's content is selected when you mouse up for the first time.
selectIndexThis is the selection index in the text presented.
tripleClickSelectsLineControls whether triple-clicking selects the entire line under the mouse pointer.

Methods

Method

Description

HasSelectionReturn true is the TextElement has a selection.
SelectAllSelects all the text contained in the field.
SelectNoneRemove selection
SelectRangeSelect text between cursorIndex and selectIndex.