Search Issue Tracker
Fixed
Fixed in 6000.0.29f1, 6000.1.0a4, 7000.0.0a1
Votes
0
Found in
6000.0.20f1
6000.1.0a2
7000.0.0a1
Issue ID
UUM-82370
Regression
Yes
"TMP_FontAsset.ClearAtlasTextures" set the size of Atlases to 1x1 when "setAtlasSizeToZero" is true resulting in a constant clearing of Atlases of size 1x1 on Editor Shutdown
How to reproduce:
1. Create a new project
2. Open the project
3. Search for the “TMP_FontAsset“ asset
4. Search for the “{{if (setAtlasSizeToZero)}}“ code snippet
Expected result: When called with “setAtlasSizeToZero == true” the Font Asset texture gets set to 0x0
Actual result: When called with “setAtlasSizeToZero == true” the Font Asset texture gets set to 1x1
Reproducible with: 2023.2.0a14, 6000.0.20f1
Not reproducible with: 2021.3.44f1, 2022.3.47f1, 2023.2.0a13
Reproducible on: macOS 14.5 (Intel), Windows 10 Pro (22H2)
Not reproducible on: No other environments tested
Workaround 1: Download the package as an independent folder. Modify {{“TMP_FontAsset.ClearAtlasTextures"}} to set the texture size to 0x0 instead of 1x1 when{{setAtlasSizeToZero==true}}
Workaround 2: Change the check condition in {{EditorEventCallbacks.InitializeFontAssetResourceChangeCallBacks}} from {{width != 0}} to {{width > 1}}
Notes:
- The essence of the issue is that with older Font Assets of size 0x0, which have already been cleared, the code snippet will not invoke the process of clearing them again. However, with newer Font Assets of size 1x1, they would get cleared again although already cleared. Unity decides the font asset is dirty, and then writes to it, though it doesn't actually change anything.
- The change was made when the TextMeshPro functionality was integrated into the “com.unity.ugui” package
- More information in the comments
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
- The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
Resolution Note (fix version 7000.0.0a1):
Ensure we only clear FontAssets that are initialized
Resolution Note (fix version 6000.1.0a4):
Ensure we only clear FontAsset that are initialized