Search Unity

Resolved Ability to get deleted characters' position like onValidateInput

Discussion in 'UGUI & TextMesh Pro' started by RFEXAUD, Jan 28, 2021.

  1. RFEXAUD

    RFEXAUD

    Joined:
    Jan 20, 2021
    Posts:
    1
    By using a custom validate I'm able to get the specific character(s) and its(their) position, however I couldn't find such event for deletion, I want to get the deleted text and the starting position (and ending position for its length), character by character is fine too.

    The goal here is to achieve operational transformation.

    I've used this reference: https://docs.unity3d.com/2018.1/Documentation/ScriptReference/UI.InputField-onValidateInput.html

    Edit: I ended up just going through the package .tgz files and adding TMP_InputField.cs to my project, renaming it and adding my custom behavior to the code (text deleted and where, caret position updated).
     
    Last edited: Jan 28, 2021