Search Unity

Unity UI NullReferenceException TMPro.TMP_SubMeshUI.UpdateMaterial

Discussion in 'UGUI & TextMesh Pro' started by pKallv, Dec 4, 2022.

  1. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    I have started to get this error lately and cannot find the source for it, anyone that knows how to fix this?

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. TMPro.TMP_SubMeshUI.UpdateMaterial () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:710)
    3. TMPro.TMP_SubMeshUI.SetMaterialDirty () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:617)
    4. UnityEngine.UI.MaskableGraphic.OnValidate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/MaskableGraphic.cs:202)
    5.