Search Unity

TextMeshPro 2.0.1 - Squares instead of text during animation

Discussion in 'UGUI & TextMesh Pro' started by SviperSniper, Jun 21, 2019.

  1. SviperSniper

    SviperSniper

    Joined:
    Mar 1, 2017
    Posts:
    37
    Hey,
    When animating a prefab, in this case just a scaling from 0 to 1 on the y axis, all texts of the prefab are shown as squares in the first frame. Texts outside of the animation behave normally. The z value of all game objects in the hierarchy is 1.

    TMP_Bug.PNG TMP_Default.PNG

    We are using version 2.0.1 and Unity Version 2019.1.7f1.
    Is this a known issue and is there are fix?

    Thanks for your help and keep up the great work!
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The issue is related to SDF Scaling where a scale of Zero will produce the white blocks. This is due to the scale of the text object being zero or not uniform where it gets in a state which isn't handled correctly.

    I am not sure what the exact configuration / setup that leads to this so I would love if you could submit a bug report and include the project or simple repro scene of this. If you do so, please provide me with the case # once you have it.

    The interim solution which should work is to scale from 0.0001 to 1. Ie. avoid 0.

    P.S. There was another post today also related to SDF Scaling where I provided some additional insight on perhaps replacing the need to pass scale to the shader and to switch to using Screen Space Derivative which used to be too costly but given mobile devices have come a long way since then might be fine now.
     
  3. SviperSniper

    SviperSniper

    Joined:
    Mar 1, 2017
    Posts:
    37
    Hey Stephan,
    it is working now with the adjusted scale.

    I created a bug report and attached a sample project (Case 1165176).
    Just open the SampleScene and the bug should occur.

    Thank you for your fast help and good luck fixing the bug :)
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for submitting the bug report.

    I am in Europe for the week so won't be able to look at it until I am back but I will most certainly take a look at it shortly after my return.