Dynamic fallback fonts failing on 2019.4.5f1 w/TMP 2.1.0

Unity 2019.4.5f1 (LTS).
TextMeshPro 2.1.0 (verified).

My TextMeshPro Dynamic fallback fonts are now failing with the following error. I have one main font in the game for English, with fallback fonts defined for Russian, Simplified Chinese, Korean, and Japanese. The failure causes the text to not appear at all.

Was working fine on 2019.4.4 (last LTS) and TextMeshPro 2.1.0 preview 13 (which I had installed previously). Failure started on 2019.4.5f1, upgraded to TMP 2.1.0 verified to see if it would fix.

Help! :slight_smile:

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.
UnityEngine.Object.get_name () (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:189)
TMPro.TMP_MaterialManager.GetFallbackMaterial (TMPro.TMP_FontAsset fontAsset, UnityEngine.Material sourceMaterial, System.Int32 atlasIndex) (at Library/PackageCache/com.unity.textmeshpro@2.1.0/Scripts/Runtime/TMP_MaterialManager.cs:373)
TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[ ] unicodeChars) (at Library/PackageCache/com.unity.textmeshpro@2.1.0/Scripts/Runtime/TMPro_UGUI_Private.cs:1301)
TMPro.TMP_Text.ParseInputText () (at Library/PackageCache/com.unity.textmeshpro@2.1.0/Scripts/Runtime/TMP_Text.cs:1893)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@2.1.0/Scripts/Runtime/TMPro_UGUI_Private.cs:1608)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@2.1.0/Scripts/Runtime/TextMeshProUGUI.cs:224)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Applications/Unity/Hub/Editor/2019.4.5f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:210)
UnityEngine.Canvas:SendWillRenderCanvases() (at /Users/builduser/buildslave/unity/build/Modules/UI/ScriptBindings/UICanvas.bindings.cs:72)

Can you check if your font assets and their material have an atlas texture assigned to them?

Can you submit a bug report with the project for me to look at?

I am getting ready to release version 2.1.1 and would like to take a look at this.

I wound up making the error go away by switching the fallback fonts to Static, generating and saving atlases, then switching back to Dynamic. ::shrug::

The project is kind of big (apx 1GB IIRC) and the Bug Reporter seems to choke when I try to send it in. I’ve had a few other bugs reported (e.g. malloc crashed related to Particles) that were verified and fixed, but I had to use a special Unity tool to upload.

Here’s the only repro steps that I can think of:

Create a font with a few fallbacks in, say a few versions ago 2019 LTS. Main font is static, 2-3 dynamic. Verify that they display properly. Mix display on a single screen. Then try upgrading to the absolute latest LTS & TextMeshPro. If that doesn’t repro I don’t know what would.

LMK if you have any Qs. I’m using Futura for English, NotoSans-Bold for Cyrillic, NotoSansJP, NotoSanKR, NotoSansSC for Asian. English and Cyrillic are set to static, Asian are all dynamic.

FWIW despite the futzing it’s working beautifully overall. All of the game data is stored in UTF-8 CSV files. I have a few custom components that handle the translation. Using Google Translate via Google Sheets for initial quick-and-dirty testing and hiring a firm to do native polish & testing. At some point I may record a YouTube tutorial or something. :slight_smile:

1 Like