[3.2.0-pre.1]Text as squares in rare case

This is rather low priority as I found workaround but here it is:

If on the same frame I do:

tmp.text = "text";
tmp.gameObject.localScale = Vector3.zero;

Text will be renderer as squares even after increasing localScale. This is common usage to make popping text animation. In my case I had it on "3D Object/Text TextMeshPro", haven't tried UI. Going to make repro later, workaround:

tmp.text = "text";
tmp.gameObject.localScale = Vector3.one * 0.0001f;

Btw I downloaded new tmp essentials.

[quote=“Kamyker”, post:1, topic: 854087]
This is rather low priority as I found workaround but here it is:

If on the same frame I do:

tmp.text = "text";
tmp.gameObject.localScale = Vector3.zero;

Text will be renderer as squares even after increasing localScale. This is common usage to make popping text animation. In my case I had it on “3D Object/Text TextMeshPro”, haven’t tried UI. Going to make repro later, workaround:

tmp.text = "text";
tmp.gameObject.localScale = Vector3.one * 0.0001f;

Btw I downloaded new tmp essentials.
[/quote]

I was able to reproduce this issue and have resolved it.

The fix will be included in the next preview release of the TMP package. In the meantime, the workaround that you have should work fine.

P.S. The following change in both the TMPro_Private.cs and TMPro_UGUI_Private.cs will resolve the issue.

7467179--917213--upload_2021-9-1_22-52-5.png
In order for the above change to be persistent, it will need to be made in the Global Package Cache of the package.

[quote=“Stephan_B”, post:2, topic: 854087]
I was able to reproduce this issue and have resolved it.

The fix will be included in the next preview release of the TMP package. In the meantime, the workaround that you have should work fine.

P.S. The following change in both the TMPro_Private.cs and TMPro_UGUI_Private.cs will resolve the issue.

In order for the above change to be persistent, it will need to be made in the Global Package Cache of the package.
[/quote]
Thank you, that was quick!

1 Like