Search Issue Tracker

Fixed

Votes

0

Found in [Package]

preview.6-1.5.0, preview.7-2.1.0, preview.7-3.0.0

Issue ID

1230799

Regression

Yes

TMP_Text.text reverts to a previous value in Play Mode after assigning an empty string from the script and changing its Rotation

Package: TextMeshPro

-

How to reproduce:
1. Open the project "case_1230799-TMP_Text"
2. Open the scene "SampleScene"
3. Enter the Play Mode
4. Select the GameObject "Canvas" in the Hierarchy
5. Check the box for the Test Switch Empty in the Testest (Script) component in the Inspector
6. Select the GameObject "Text (TMP)" in the Hierarchy
7. Observe that the text of the "Text (TMP)" is empty in the Game view
8. Change any value of the Rotation in the Rect Transform in the Inspector
9. Observe the changes in the Game window

Expected results: the text of the "Text (TMP)" remains empty in the Game view and Text Input box is empty in the TextMeshPro - Text(UI) component in the Inspector
Actual results: the text of the "Text (TMP)" has the previous value in the Game view but the Text Input box is empty in the TextMeshPro - Text(UI) component in the Inspector

Reproducible with: preview.6-1.5.0 (2018.4.20f1), preview.8-1.5.0 (2018.4.20f1), preview.7-2.1.0 (2019.3.7f1), preview.8-2.1.0 (2019.3.7f1), preview.7-3.0.0 (2020.1.0b3, 2020.2.0a6), preview.8-3.0.0 (2020.1.0b3, 2020.2.0a6)
Not reproducible with: preview.5-1.5.0 (2018.4.20f1), 2.0.1 (2019.3.7f1), preview.5-2.1.0 (2019.3.7f1), preview.5-3.0.0 (2020.1.0b3, 2020.2.0a6)

Could not test with: 2017.4.39f1 because Package Manager is not available

  1. Resolution Note:

    Fixed in TextMeshPro 1.5.0-preview.10, 2.1.0-preview.10, 3.0.0-preview.10

Comments (2)

  1. NoFS

    Apr 07, 2020 11:55

    Thank you, STEPHAN_B!!!

  2. Stephan_B

    Apr 06, 2020 21:45

    I was able to take a closer look at this issue which was the result of floating point errors in the lossy scale of the text object resulting from the rotation. This was causing the SDF Scale of the text object to be updated thus making the text object visible again.

    This issue has been resolved with the fix included in version 1.5.0-preview.9 of the TMP package for Unity 2018.4, version 2.1.0-preview.9 for Unity 2019.x and 3.0.0-preview.9 for Unity 2020.x.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.