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
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
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