Search Unity

HUGE problem after updating to 3.0.3 from 2.0.1

Discussion in 'UGUI & TextMesh Pro' started by novaVision, Dec 21, 2020.

  1. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    I have updated the project from Unity 2019.3 to 2020.1, and also decided to update TextMestPro to the latest 3.0.3 from 2.0.1.
    I did as recommended - updated the package using UPM, remove TextMeshPro from Assets and reimported resources.

    Unfortunately now text fields has a horrible issue - some part of the text become hidden randomly - sometimes is ok, sometimes not. Here how it looks like:
    2.png

    This happens with most text in the app, same - randomly. Changing some properties while playing in Editor immediately fixes the issue. Same happens on iOS and Android builds.
    First idea was it might be materials issue - I have recreated font assets, but still had the problem. Furthermore it exists even using standard LiberationSans font assets.

    This issue is just horrible - app is broken. The worst here that I can't downgrade it back to 2.0.1

    What happened and how to fix it?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This issue is related to recent changes to reduce text object memory overhead where the use of underline has the potential of cause the issue you outlined above. Fortunately, I am already aware of this issue which is resolved by making the following change.

    In the TMPro_UGUI_Private.cs in the OnPreRenderCanvas() function around line 1616, make the following change which will force the text input to always be parsed when any of the text properties are changed.

    Code (csharp):
    1.  
    2. // Reparse the text if the input has changed or text was truncated.
    3. if (true) // m_isInputParsingRequired || m_isTextTruncated)
    4. {
    5.     #if TMP_PROFILE_ON
    6.     Profiler.BeginSample("TMP - ParseInputText()");
    7.     #endif
    8.  
    Note that if you are using normal <TextMeshPro> components, you will need to make the same change in the TMPro_Private.cs file.

    In order to make these changes persistent, you will need to make the changes in the relevant TMP package files in the Global Package Cache.

    These changes will be included in the next release of the TMP package.
     
    novaVision likes this.