Search Unity

TextMesh Pro Possible bug in TMP layout

Discussion in 'UGUI & TextMesh Pro' started by dadude123, Dec 15, 2017.

  1. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    This is my TMP configuration:
    https://i.imgur.com/Xk2LXC3.png

    I rely on Min/Max size to auto fit the text.
    Sometimes there is enough text so multiple lines are neccesary (Wrapping is set to enabled).

    When I add more text, the font size gets smaller and stays on one line, all as intended so far.
    Once the text cannot get any smaller it breaks (also as intended), but the space TMP reserves is wrong now.

    Have a look at this video to see exactly what I mean:

    https://streamable.com/xgo1x

    I think TMP stays at the smallest font size allowed, but then when it comes to reserving space in the layout it uses a different font size somehow.

    Is this a bug? If yes, will fixes still be released for the current asset store version?
    What can I do to work around it in the meantime?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of TMP are you using?

    Can you provide images showing the settings on the parent components which contain Layout components? It would be even better if you could export and upload a scene of this object setup.
     
  3. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    Yes will do, one moment.

    "InnerPanel", the container for the next 3 things: https://i.imgur.com/dfaGNxw.png

    https://i.imgur.com/poRh9C0.png
    https://i.imgur.com/LFH3SR9.png
    https://i.imgur.com/Y00ebsD.png

    As for version: I'm using the latest version from the asset store: 1.0.56.0b2 (Dec 07)
    Unity version: 2017.3.0f2

    Uploading a scene would take a long time I guess since the one that was made in has a ton of references.

    I will try to reproduce the problem in a new project.
    If that does not work I'll have to send you an invite link to the project.


    edit:
    I confirmed that this also happens in a new project. Video coming in a moment that will show the whole setup (pretty simple)
     
    Last edited: Dec 15, 2017
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This does in fact look like an issue.

    I'll try taking a look tonight. I'll provide feedback as soon as I have more information.
     
  5. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    Here is the video.
    There is another thing I just noticed.

    When the text gets bigger after deleting enough characters, the text stays small!
    And when I add letters again, the text gradually becomes bigger as more letters are getting added.
    I made the video a little longer to also show that.

    https://streamable.com/99ncq
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Just letting you know that I am able to reproduce the issue you have reported.

    I'll be looking into this over the weekend.
     
    dadude123 likes this.