Search Unity

Bug Possible TMP_InputField "OnValueChanged" bug

Discussion in 'UGUI & TextMesh Pro' started by Francesco-FL, Jun 17, 2022.

  1. Francesco-FL

    Francesco-FL

    Joined:
    May 25, 2021
    Posts:
    176
    Hi,

    When I paste a text into the inputfield, the "OnValueChanged" function is called as many times as there are characters, and partial paste. Shouldn't it be called only once because the variation of the text occurs all together at the same instant?

    I'll give you a practical example, I want to transform "⅙" into "1/6", so I write a very simple function that converts the character for me and I put it in "OnValueChanged".
    Then I copy "⅙ + ⅙" and paste it into the inputfield, it should get "1/6 + 1/6", instead it comes "1 + 1/6/6", with these internal passages:


    1/6
    1 /6
    1 +/6
    1 + /6
    1 + ⅙/6
    1 + 1/6/6

    is it a bug?
     
    PhannGor likes this.
  2. Francesco-FL

    Francesco-FL

    Joined:
    May 25, 2021
    Posts:
    176
    Incident IN-8260