Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Annoyances with TMP_InputField

Discussion in 'UGUI & TextMesh Pro' started by ratking, Feb 14, 2022.

  1. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    Hallo,

    working a bit more with multiline TMP_InputFields I noticed some flaws, and I wonder if there are fixes for them, or if they are worked on.

    For example, clicking a tiny bit more quickly than super precise while hovering an area next to text always selects the last character of the line, instead of just placing the caret. I wish it would be less sensible in this regard.

    Second, the scrollbar does not react to empty lines, even with whitespaces. Meaning, if you create a new line, the vertical scrollbar does not recognize the actual bounds of the input field - only if you begin to type a non-whitespace character.

    Desktop 14-02-2022 21-20-22.gif
     
    Last edited: Feb 15, 2022
  2. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    Here's hoping this will get an reply or even fix some day.
     
  3. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    Also getting a lot of errors when resizing the TMP_InputField (with a scrollbar) dynamically (on the X axis):

    "Trying to add Handle (UnityEngine.UI.Image) for graphic rebuild while we are already inside a graphic rebuild loop. This is not supported."
     
    Last edited: Feb 28, 2022
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of the TMP package are you using? Please test the latest preview release for the version of Unity you are using. That would be either version 2.2.0-pre.2 for Unity 2019.4 or version 3.2.0-pre.2 for Unity 2020 or newer. These new release include the preserver whitespace support which should behave better with respect to whitespaces.

    I would also suggest check how the scrollbar is handled in the example scene included with TMP to make sure your setup mirrors that.

    Let me know if any of the above helps. If, not can you please submit a bug report with the simple scene you are using above.
     
  5. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    Thanks for the reply. I already had the latest preview release for my Unity 2020.3.25. I also checked out the example scene and it has the same problems and errors as described above. For example, creating empty new lines at the end of the text does not change the scroll bar's handle even thought it should. And as soon as I resize the input field on the x axis (via the inspector or the manipulator tool) while the scroll bar is present - errors gets spawn.
     
  6. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    I sent a bug report. Case number is 1408532.
     
    Stephan_B likes this.
  7. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    I can't believe the problem with the scrollbar (it's wrong when only having whitespace at the bottom of the input field) is still not fixed (Unity 2022.3.14f1)