Preparing search index...

    Class CursorPosition

    The position of a text cursor for a given character index, returned by Text.getCursorPositions and Text3D.getCursorPositions.

    Lens Scripting Version 324

    //@input Component.Text textComponent
    var cursors = script.textComponent.getCursorPositions();
    cursors.forEach(function (cursor) {
    print("Character " + cursor.index + " cursor at " + cursor.position);
    });
    Index

    Properties

    Properties

    index: number

    Character index in the current text that this cursor precedes.

    Lens Scripting Version 324

    position: vec2

    Position of the cursor, in the same coordinate space as the Text component's local layout.

    Lens Scripting Version 324