derkoi
May 20, 2024, 10:11am
1
Hey, I’m using Unity 2022.3.29f1 and I’m having TextMesh Pro UGUI issues. I’ve had these across multiple projects over multiple version of Unity over the last few months.
I keep losing my text in editor with the error:
UnassignedReferenceException: The variable m_AtlasTextures of TMP_FontAsset has not been assigned.
You probably need to assign the m_AtlasTextures variable of the TMP_FontAsset script in the inspector.
TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMP_FontAsset.cs:2063)
TMPro.TMP_FontAssetUtilities.GetCharacterFromFontAsset_Internal (System.UInt32 unicode, TMPro.TMP_FontAsset sourceFontAsset, System.Boolean includeFallbacks, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isAlternativeTypeface) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMP_FontAssetUtilities.cs:159)
TMPro.TMP_FontAssetUtilities.GetCharacterFromFontAssets (System.UInt32 unicode, TMPro.TMP_FontAsset sourceFontAsset, System.Collections.Generic.List`1[T] fontAssets, System.Boolean includeFallbacks, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isAlternativeTypeface) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMP_FontAssetUtilities.cs:241)
TMPro.TMP_Text.GetEllipsisSpecialCharacter (TMPro.TMP_FontAsset fontAsset) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMP_Text.cs:6029)
TMPro.TMP_Text.GetSpecialCharacters (TMPro.TMP_FontAsset fontAsset) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMP_Text.cs:6005)
TMPro.TextMeshProUGUI.LoadFontAsset () (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMPro_UGUI_Private.cs:574)
TMPro.TextMeshProUGUI.Awake () (at ./Library/PackageCache/com.unity.textmeshpro@3.0.9/Scripts/Runtime/TMPro_UGUI_Private.cs:121)
I’m using TextMesh Pro 3.0.9 and a dynamic font ‘NotoSansMonoCJKjp-Bold’ set as a global fallback font in settings for localization & I followed the advise here with no success.
Any ideas please as I’m sick of fighting this.
MCF24
May 23, 2024, 9:24am
3
Check whether the font contains the letters you want to display.
Alternatively, it may be a good idea to increase the size of Atlas in TMP settings.
derkoi
May 23, 2024, 12:04pm
4
It does but isn’t that what the global fallback font is for?
MCF24
May 24, 2024, 12:10am
5
I’m not sure if I understood correctly because I used a translator.
What you said is correct.
Are the letters disappearing only in the editor?
The problem is when the error shows up in editor the textmeshpro component gets disabled, so if I’m not careful & I save the scene, the text is missing in the build.
MCF24
May 24, 2024, 8:09am
7
If the problem is recent, the size of your Atlas may be the issue.
Would you like to try adjusting the Atlas size of the font you are using?
Sure, what size do you suggest?
MCF24
May 24, 2024, 8:13am
9
I am using 4096 x 4096. Try changing it to this size
I am using a translator, so I apologize in advance if the expression seems rude.
derkoi
May 24, 2024, 8:49am
10
MCF24:
I am using 4096 x 4096. Try changing it to this size
I am using a translator, so I apologize in advance if the expression seems rude.
I tried that and it’s still the same. I also tried rolling TMP back to v3.0.6 and it still does it.
Did you ever find a solution? I’ve started running into this same issue now.