Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Upgrade to 2020 resulted in broken character display

Discussion in 'UGUI & TextMesh Pro' started by CoolJosh3k, Mar 26, 2021.

  1. CoolJosh3k

    CoolJosh3k

    Joined:
    Dec 3, 2016
    Posts:
    145
    After upgrading from Unity 2019.4.22f1 to 2020.3.1f1 I notice all text from TextMesh Pro is rather messed up.
    I made sure to update all my packages that needed it, including TMP.
    Untitled.png
    In the image, the top row is using the basic LiberationSans, while the bottom is my own custom font being brutally stylised without my desire.

    From first glance to me it seemed that something was off with the atlas UVs, but I have tried rebuilding and there has been no change.

    I also tested running my game as the stand alone build, but the same graphical issue is present.

    Any help appreciated.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    What version of the TMP package were you using in 2019.4 and now in 2020.3?

    I would recommend using version 3.0.4 of the TMP package in Unity 2020.3.

    What do you mean by rebuild? Do you mean regenerating the font assets or just rebuild the player?

    Can you post an image of how your font appeared before along with the font asset inspector where we can set the Generation Settings?
     
  3. CoolJosh3k

    CoolJosh3k

    Joined:
    Dec 3, 2016
    Posts:
    145
    I updated to using 3.0.4 now after migrating to 2020.

    I regenerated the font asset, but I also see the issue with LiberationSans anyway.
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Per my previous reply,

    "Can you post an image of how your font appeared before along with the font asset inspector where we can set the Generation Settings?"
     
  5. CoolJosh3k

    CoolJosh3k

    Joined:
    Dec 3, 2016
    Posts:
    145
    Sorry for the delay.

    Here is a cropped screenshot from it rendering in game back on Unity 2019.4.22f1 using TMP 2.0.1:
    Text_Correct.png

    Updating TMP to 2.1.4, but still with Unity 2019.4.22f1:
    Text_Incorrect.png
     
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Can you create and export a simple scene using this font asset in TMP 2.0.1? This will enable me to do the upgrade on my end to figure out why you are getting these results?

    If needed, you can provide me with this exported .unitypackage via PM.
     
  7. CoolJosh3k

    CoolJosh3k

    Joined:
    Dec 3, 2016
    Posts:
    145
    Also here are the generation settings used:
    Text_Generation.png

    And the resulting glyphs after updating:
    Text_Glyphs.png

    I have since realised that changing my padding from 0 to 1 (or more) does actually fix the issue. It would appear that the updated version no longer likes zero padding for my raster font.
     
  8. CoolJosh3k

    CoolJosh3k

    Joined:
    Dec 3, 2016
    Posts:
    145
    Done.

    Issue occurs as soon as an upgrade to TMP 2.1.0 is made, but changing padding to 1 fixed the issue.
     
  9. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    I got your private message. Will take a closer look tomorrow.

    I think I added some padding to prevent clipping in the latest release which is likely causing this issue with zero padding.
     
    CoolJosh3k likes this.
  10. CoolJosh3k

    CoolJosh3k

    Joined:
    Dec 3, 2016
    Posts:
    145
    Any luck?

    My problem is solved now by just setting it to non-zero padding, which I should have had anyway.

    I am curious how things are going.
     
  11. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    The issue is indeed caused by the padding change to prevent clipping where this would cause the reported issue with a padding value of zero.