Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug TypeLoadException: Could not load type of field 'TMPro.TMP_FontAsset:m_FaceInfo'

Discussion in 'UGUI & TextMesh Pro' started by reecpj, Aug 3, 2022.

  1. reecpj

    reecpj

    Joined:
    Apr 5, 2013
    Posts:
    4
    When running the EditMode TestRunner test GetPlayerSettingsTest in Unity 2021, I get this error stopping the tests running. This does not happen on Unity 2019. I am using TextMeshPro 3.0.6
    Code (CSharp):
    1. TypeLoadException: Could not load type of field 'TMPro.TMP_FontAsset:m_FaceInfo' (5) due to: Could not load file or assembly 'UnityEngine.TextCoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    2. System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d4cde64232cf45659d86aafa597faa77>:0)
    3. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    4. System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d4cde64232cf45659d86aafa597faa77>:0)
    5. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d4cde64232cf45659d86aafa597faa77>:0)
    6. UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at <36f62d8e760b48f7af5d32916f997ce1>:0)
    7. UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets, System.Boolean didDomainReload) (at <36f62d8e760b48f7af5d32916f997ce1>:0)
    8. UnityEditor.AssetDatabase:Refresh()
    9. EditmodeMetadataCollector:CreatePerformanceTestRunJson() (at Library/PackageCache/com.unity.test-framework.performance@1.2.3-preview/Editor/EditmodeMetadataCollector.cs:56)
    10. EditmodeMetadataCollector:Setup() (at Library/PackageCache/com.unity.test-framework.performance@1.2.3-preview/Editor/EditmodeMetadataCollector.cs:41)
    11. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    12.  
     
  2. patrickreece

    patrickreece

    Joined:
    Nov 14, 2019
    Posts:
    23
    Still getting this! Maybe it's just me