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
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
- Selecting and deleting transition in Animator does not add to Undo History when animation is previewed in Inspector
- GameObjects remain static when updating constraints of PhysicsJoint with "Enable Sleeping" selected in Havok Physics Configuration
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
- [sw-unity-6-1] Scene view renders any light differently when more than one camera exists and neither have the "MainCamera" tag
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