Search Issue Tracker
Active
Under Consideration for 6000.0.X
Votes
0
Found in
6000.0.20f1
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
Add comment