Chinese character 世 breaks text when using fallback font in editor

My setup is:

  1. Main font asset is English only
  2. Bunch of other fonts as fallback (including NotoSansSC-Medium)

Everything works fine, some characters are missing and shown as squares but this 世 breaks text field completely. It works fine when NotoSansSC is set as font for tmp_text component.

#edit
Works fine in built game so only happens in editor.

I would need to get a repro project to figure out why this is behaving differently in the Editor vs. Build.

Make sure you are using the latest release of TMP. I behavior persists, please submit a bug report with project so I can take a closer look.

I’m using the newest one (3.0.6). Will make repro project if I find some time.

After releasing update with 3.0.6 (previous one was using 3.0.3) there’s a lot more errors in built game:

NullReferenceException: Object reference not set to an instance of an object.: TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at <00000000000000000000000000000000>:0) 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 <00000000000000000000000000000000>:0) 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 <00000000000000000000000000000000>:0) TMPro.TMP_Text.GetTextElement (System.UInt32 unicode, TMPro.TMP_FontAsset fontAsset, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isUsingAlternativeTypeface) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <00000000000000000000000000000000>:0) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <00000000000000000000000000000000>:0) System.Runtime.Remoting.Contexts.CrossContextDelegate.Invoke () (at <00000000000000000000000000000000>:0) System.Runtime.Remoting.Contexts.CrossContextDelegate:Invoke() (224)
NullReferenceException: Object reference not set to an instance of an object.: TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at <00000000000000000000000000000000>:0) 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 <00000000000000000000000000000000>:0) 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 <00000000000000000000000000000000>:0) TMPro.TMP_Text.GetTextElement (System.UInt32 unicode, TMPro.TMP_FontAsset fontAsset, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isUsingAlternativeTypeface) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <00000000000000000000000000000000>:0) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <00000000000000000000000000000000>:0) System.Runtime.Remoting.Contexts.CrossContextDelegate.Invoke () (at <00000000000000000000000000000000>:0) UnityEngine.UI.ScrollRect.LateUpdate () (at <00000000000000000000000000000000>:0) UnityEngine.UI.ScrollRect:LateUpdate() (65)
NullReferenceException: Object reference not set to an instance of an object.: TMPro.TMP_MaterialManager.GetFallbackMaterial (TMPro.TMP_FontAsset fontAsset, UnityEngine.Material sourceMaterial, System.Int32 atlasIndex) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <00000000000000000000000000000000>:0) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <00000000000000000000000000000000>:0) System.Runtime.Remoting.Contexts.CrossContextDelegate.Invoke () (at <00000000000000000000000000000000>:0) System.Runtime.Remoting.Contexts.CrossContextDelegate:Invoke() (27)
NullReferenceException: Object reference not set to an instance of an object.: TMPro.TMP_MaterialManager.GetFallbackMaterial (TMPro.TMP_FontAsset fontAsset, UnityEngine.Material sourceMaterial, System.Int32 atlasIndex) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <00000000000000000000000000000000>:0) TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <00000000000000000000000000000000>:0) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <00000000000000000000000000000000>:0) System.Runtime.Remoting.Contexts.CrossContextDelegate.Invoke () (at <00000000000000000000000000000000>:0) UnityEngine.UI.ScrollRect.LateUpdate () (at <00000000000000000000000000000000>:0) UnityEngine.UI.ScrollRect:LateUpdate() (18)

Hmm I’ve changed from 3 separate fallback fonts (sc, jp, ch) to single NotoSansCJK and errors are gone.

Well, let’s say that’s fixed.

1 Like

Got similar issue again, this time I had to Clear Dynamic Data. Error said that m_AtlasTextures[m_AtlasTextureIndex] is null in TryAddCharacterInternal. Text asset had 2 full atlas textures and it seemed like 3rd one wasn’t created but somehow m_AtlasTextureIndex was pointing there.

I think i found what causes it. In TMP_FontAsset.cs SetupNewAtlasTexture():

            #if UNITY_EDITOR
            // Add new texture as sub asset to font asset
            if (UnityEditor.EditorUtility.IsPersistent(this))
            {
                Texture2D tex = m_AtlasTextures[m_AtlasTextureIndex];
                tex.name = m_AtlasTexture.name + " " + m_AtlasTextureIndex;

                UnityEditor.AssetDatabase.AddObjectToAsset(m_AtlasTextures[m_AtlasTextureIndex], this);
                TMP_EditorResourceManager.RegisterResourceForReimport(this);
            }
            #endif

m_AtlasTexture is null, shouldn’t it use atlasTexture (that sets m_AtlasTexture when it’s null) ?

UnassignedReferenceException: The variable m_AtlasTexture of TMP_FontAsset has not been assigned.
You probably need to assign the m_AtlasTexture variable of the TMP_FontAsset script in the inspector.
UnityEngine.Object.get_name () (at <127e81e1cb3441cc97d26b1910daae77>:0)
TMPro.TMP_FontAsset.SetupNewAtlasTexture () (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_FontAsset.cs:2416)
TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_FontAsset.cs:2118)
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 Packages/com.unity.textmeshpro/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 Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_FontAssetUtilities.cs:241)
TMPro.TMP_Text.GetTextElement (System.UInt32 unicode, TMPro.TMP_FontAsset fontAsset, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isUsingAlternativeTypeface) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Text.cs:6147)
TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_UGUI_Private.cs:1209)
TMPro.TMP_Text.ParseInputText () (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Text.cs:1902)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_UGUI_Private.cs:1644)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TextMeshProUGUI.cs:216)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:217)
UnityEngine.Canvas:SendWillRenderCanvases()

Are you able to reproduce the behavior that leads to this issue?

Can you reproduce this with any font asset and what are the steps to get it into that state?

No but found something that could be related, when I reset tmp asset (and internally new assets are added) reimport doesn’t occur as TMP_EditorResourceManager uses Camera.onPostRender that isn’t called in URP/HDRP.

Great catch!

This would explain why some of the font asset data like newly added glyphs which may be referencing those additional atlas textures is serialized but not the additional textures.

I will try taking a closer look at this over the next day or so and follow up once I have more information.

1 Like

Hi, any news? This bug also happens when Unity crashes in playmode and then I have to restart font asset every time.

I did make the relevant changes to make sure the added atlas texture get serialized when using SRP.

In terms of potential atlas textures not getting serialized correctly when Unity crashes, I will have to do some additional testing on this. I think that it should be fine with the new changes as the crash would have to occur just as we added a new atlas texture and then before the end of that same frame have Unity crash.

Ok thanks, waiting for 3.0.7.

I had this same issue in Unity 2019.4.21f1 on TMP 2.1.6 (should be equiv of 3.0.6). Not sure how I got into that state. For me, doing a reset left dangling textures - it would reset the first texture, and delete all references in the TMP font asset (verified by looking at the asset file), but it retained subsequent textures attached to the object just hanging there. Not sure if those would have caused issues explicitly, but I reset all my dynamic textures using this custom reset logic that I triggered from an editor menu:

        // dynamicFonts should be some list of the fonts you want to reset
        private static void ResetDynamicFontTextures(List<TMP_FontAsset> dynamicFonts)
        {
            foreach (var font in dynamicFonts)
            {
                var objectsToKeep = new List<UnityEngine.Object>()
                {
                    font.atlasTexture,
                    font.material
                };
               DeleteSubObjects(font, objectsToKeep);
                font.ClearFontAssetData();
            }
            AssetDatabase.SaveAssets();
        }


        // Delete any old sub objects inside a main asset.
        // https://discussions.unity.com/t/739349/2
        public static void DeleteSubObjects(UnityEngine.Object mainAsset, List<UnityEngine.Object> objectsToKeep = null)
        {
            UnityEngine.Object[] assets = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(mainAsset));
            foreach(UnityEngine.Object obj in assets)
            {
                if ( obj == null ||
                     ( ! AssetDatabase.IsMainAsset(obj) &&
                       ! (obj is GameObject) &&
                       ! (obj is Component) &&
                       ! (objectsToKeep != null && objectsToKeep.Contains(obj))
                     )
                )
                    UnityEngine.Object.DestroyImmediate(obj, true);
            }
        }

This issue was due to OnPostRender not getting called when using SRP (URP / HDRP). This was causing the changes to the font asset to get serialized but not the atlas textures. As such, you would end up with glyphs potentially referencing some atlas texture index greater than zero which exceeded the atlas texture array size.

This fix for this issue is included in version 2.2.0-preview.1 of the TMP package for Unity 2019.4 and version 3.2.0-pre.1 for Unity 2020.3 or newer.

Still getting similar error in 3.2.0-pre2

MissingReferenceException: The variable m_AtlasTextures of TMP_FontAsset doesn't exist anymore.
You probably need to reassign the m_AtlasTextures variable of the 'TMP_FontAsset' script in the inspector.
UnityEngine.Object.get_name () (at <0ee480759f3d481d82ada245dc74f9fd>:0)
TMPro.TMP_MaterialManager.GetFallbackMaterial (TMPro.TMP_FontAsset fontAsset, UnityEngine.Material sourceMaterial, System.Int32 atlasIndex) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_MaterialManager.cs:370)
TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_UGUI_Private.cs:1323)
TMPro.TMP_Text.ParseInputText () (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Text.cs:1946)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_UGUI_Private.cs:1636)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Packages/com.unity.textmeshpro/Scripts/Runtime/TextMeshProUGUI.cs:216)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:215)
UnityEngine.Canvas:SendWillRenderCanvases()

Or

UnassignedReferenceException: The variable m_AtlasTexture of TMP_FontAsset has not been assigned.
You probably need to assign the m_AtlasTexture variable of the TMP_FontAsset script in the inspector.
UnityEngine.Object.get_name () (at <0ee480759f3d481d82ada245dc74f9fd>:0)
TMPro.TMP_FontAsset.SetupNewAtlasTexture () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_FontAsset.cs:2781)
TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_FontAsset.cs:2499)
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.2.0-pre.2/Scripts/Runtime/TMP_FontAssetUtilities.cs:158)
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.2.0-pre.2/Scripts/Runtime/TMP_FontAssetUtilities.cs:240)
TMPro.TMP_Text.GetTextElement (System.UInt32 unicode, TMPro.TMP_FontAsset fontAsset, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isUsingAlternativeTypeface) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_Text.cs:6362)
TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] textProcessingArray) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMPro_UGUI_Private.cs:1194)
TMPro.TMP_Text.ParseInputText () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_Text.cs:1948)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMPro_UGUI_Private.cs:1683)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TextMeshProUGUI.cs:216)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:215)
UnityEngine.Canvas:ForceUpdateCanvases()

If your exiting font assets include glyphs that are pointing to an invalid index, regenerating those font assets should resolve this issue which then should no longer occur.

If you have regenerated those font assets or if they are dynamic used the “Reset” option / “Clear Dynamic Data on Build” and it is still happening then this could be something else. If so, are you able to reproduce it?

Yes I’m using dynamic font. Tried resetting asset and Unity, a bit different log this time:

NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_FontAsset.SetupNewAtlasTexture () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_FontAsset.cs:2781)
TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_FontAsset.cs:2499)
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.2.0-pre.2/Scripts/Runtime/TMP_FontAssetUtilities.cs:158)
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.2.0-pre.2/Scripts/Runtime/TMP_FontAssetUtilities.cs:240)
TMPro.TMP_Text.GetTextElement (System.UInt32 unicode, TMPro.TMP_FontAsset fontAsset, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isUsingAlternativeTypeface) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_Text.cs:6362)
TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] textProcessingArray) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMPro_UGUI_Private.cs:1194)
TMPro.TMP_Text.ParseInputText () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMP_Text.cs:1948)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TMPro_UGUI_Private.cs:1683)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.2/Scripts/Runtime/TextMeshProUGUI.cs:216)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:215)
UnityEngine.Canvas:ForceUpdateCanvases()

I think I found a fix, changed package to local again and basically “m_AtlasTexture” is null as it’s never set. Changed it to “atlasTexture” and that was enough as it does:

get
{
    if (m_AtlasTexture == null)
    {
        m_AtlasTexture = atlasTextures[0];
    }
    return m_AtlasTexture;
}

New atlas is finally added:

Btw this is the only place where m_AtlasTexture is used, everywhere else it’s atlasTexture so I guess that’s correct fix.

        void SetupNewAtlasTexture()
        {
            (...)

            #if UNITY_EDITOR
            // Add new texture as sub asset to font asset
            Texture2D tex = m_AtlasTextures[m_AtlasTextureIndex];
            //old tex.name = m_AtlasTexture.name + " " + m_AtlasTextureIndex;
            tex.name = atlasTexture.name + " " + m_AtlasTextureIndex;
       
            OnFontAssetTextureChanged?.Invoke(tex, this);
            #endif
        }

Bump, making sure you read this @Stephan_B . Didn’t have any errors after the change above.

I’m still getting this error in the editor (unrelated to the specific character, happening to me for Japanese characters)
UnassignedReferenceException: The variable m_AtlasTexture of TMP_FontAsset has not been assigned.

TMP: 3.0.6
Unity: 2022.1.24f1

I haven’t taken made the code changes above mentioned above.
I’m using fallback fonts and have Multi Atlas Texture enabled on the Fallback font.

UnassignedReferenceException: The variable m_AtlasTexture of TMP_FontAsset has not been assigned.
You probably need to assign the m_AtlasTexture variable of the TMP_FontAsset script in the inspector.
UnityEngine.Object.get_name () (at <3b18519be5f3486abcce4fd34ea6dcd9>:0)
TMPro.TMP_FontAsset.SetupNewAtlasTexture () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_FontAsset.cs:2415)
TMPro.TMP_FontAsset.TryAddCharacterInternal (System.UInt32 unicode, TMPro.TMP_Character& character) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_FontAsset.cs:2118)
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.6/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.6/Scripts/Runtime/TMP_FontAssetUtilities.cs:241)
TMPro.TMP_Text.GetTextElement (System.UInt32 unicode, TMPro.TMP_FontAsset fontAsset, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isUsingAlternativeTypeface) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:6147)
TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:1209)
TMPro.TMP_Text.ParseInputText () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:1902)
TMPro.TMP_Text.GetPreferredWidth () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:3755)
TMPro.TMP_Text.get_preferredWidth () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:1384)
UnityEngine.UI.LayoutUtility+<>c.<GetPreferredWidth>b__4_1 (UnityEngine.UI.ILayoutElement e) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutUtility.cs:68)
UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform rect, System.Func`2[T,TResult] property, System.Single defaultValue, UnityEngine.UI.ILayoutElement& source) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutUtility.cs:161)
UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform rect, System.Func`2[T,TResult] property, System.Single defaultValue) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutUtility.cs:129)
UnityEngine.UI.LayoutUtility.GetPreferredWidth (UnityEngine.RectTransform rect) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutUtility.cs:68)
UnityEngine.UI.LayoutUtility.GetPreferredSize (UnityEngine.RectTransform rect, System.Int32 axis) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/LayoutUtility.cs:31)
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.GetChildSizes (UnityEngine.RectTransform child, System.Int32 axis, System.Boolean controlSize, System.Boolean childForceExpand, System.Single& min, System.Single& preferred, System.Single& flexible) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/HorizontalOrVerticalLayoutGroup.cs:233)
UnityEngine.UI.HorizontalOrVerticalLayoutGroup.CalcAlongAxis (System.Int32 axis, System.Boolean isVertical) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Layout/HorizontalOrVerticalLay