Getting mysterious error from text material in Play Mode

Hi folks. I have a mysterious bug on my text material that’s harmless but just annoying.

Basically, when I enter Play Mode in my project, I get the following errors (Both in editor as well as on build):

Material 'NunitoHeavy-Regular SDF[GreenOutline-DropShadow]' with Shader 'TextMeshPro/Distance Field' doesn't have a float or range property '_CullMode'
0x00007ff7c6b86bbd (Unity) StackWalker::GetCurrentCallstack
0x00007ff7c6b8bc89 (Unity) StackWalker::ShowCallstack
0x00007ff7c7b670b1 (Unity) GetStacktrace
0x00007ff7c822011e (Unity) DebugStringToFile
0x00007ff7c6806ba1 (Unity) Material::GetFloat
0x00007ff7c5b93b0c (Unity) Material_CUSTOM_GetFloatImpl
0x000001a7777e79d4 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Material:GetFloatImpl (UnityEngine.Material,int)
0x000001a94cce82eb (Mono JIT Code) UnityEngine.Material:GetFloat (string)
0x000001a94cce7563 (Mono JIT Code) TMPro.TMP_SubMeshUI:UpdateMaterial () (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:710)
0x000001a94cce727a (Mono JIT Code) TMPro.TMP_SubMeshUI:SetMaterialDirty () (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:617)
0x000001a94cce7c06 (Mono JIT Code) TMPro.TMP_SubMeshUI:SetSharedMaterial (UnityEngine.Material) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:843)
0x000001a94cce609b (Mono JIT Code) TMPro.TMP_SubMeshUI:AddSubTextObject (TMPro.TextMeshProUGUI,TMPro.MaterialReference) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_SubMeshUI.cs:240)
0x000001a8bf2bddf3 (Mono JIT Code) TMPro.TextMeshProUGUI:SetArraySizes (TMPro.TMP_Text/UnicodeChar[]) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:1403)
0x000001a8bf2ae421 (Mono JIT Code) TMPro.TMP_Text:ParseInputText () (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:1902)
0x000001a8bf2add43 (Mono JIT Code) TMPro.TextMeshProUGUI:OnPreRenderCanvas () (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:1644)
0x000001a8bf2ad6b3 (Mono JIT Code) TMPro.TextMeshProUGUI:Rebuild (UnityEngine.UI.CanvasUpdate) (at ./Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TextMeshProUGUI.cs:216)
0x000001a8bf2aac89 (Mono JIT Code) UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:215)
0x000001a8bf2a9d47 (Mono JIT Code) (wrapper delegate-invoke) <Module>:invoke_void ()
0x000001a8bf2a9f9e (Mono JIT Code) UnityEngine.Canvas:SendWillRenderCanvases ()
0x000001a94cb27873 (Mono JIT Code) UnityEngine.Canvas:ForceUpdateCanvases ()
0x000001a94cb27713 (Mono JIT Code) UnityEngine.UI.ScrollRect:EnsureLayoutHasRebuilt () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/ScrollRect.cs:636)
0x000001a94cbd0b63 (Mono JIT Code) UnityEngine.UI.ScrollRect:LateUpdate () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/ScrollRect.cs:834)
0x000001a94ca610b8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffb8ca34bfe (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffb8c96d254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffb8c96d3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff7c6aa03a4 (Unity) scripting_method_invoke
0x00007ff7c6a7e114 (Unity) ScriptingInvocation::Invoke
0x00007ff7c6a65904 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff7c6a65a2a (Unity) MonoBehaviour::CallUpdateMethod
0x00007ff7c64f91eb (Unity) BaseBehaviourManager::CommonUpdate<LateBehaviourManager>
0x00007ff7c65005ba (Unity) LateBehaviourManager::Update
0x00007ff7c673505d (Unity) `InitPlayerLoopCallbacks'::`2'::PreLateUpdateScriptRunBehaviourLateUpdateRegistrator::Forward
0x00007ff7c671438c (Unity) ExecutePlayerLoop
0x00007ff7c6714500 (Unity) ExecutePlayerLoop
0x00007ff7c671ad95 (Unity) PlayerLoop
0x00007ff7c76e6f9f (Unity) PlayerLoopController::InternalUpdateScene
0x00007ff7c76f3dcd (Unity) PlayerLoopController::UpdateSceneIfNeededFromMainLoop
0x00007ff7c76f20b1 (Unity) Application::TickTimer
0x00007ff7c7b6cd5a (Unity) MainMessageLoop
0x00007ff7c7b71c30 (Unity) WinMain
0x00007ff7c8f52c1e (Unity) __scrt_common_main_seh
0x00007ffc537c257d (KERNEL32) BaseThreadInitThunk
0x00007ffc5482af28 (ntdll) RtlUserThreadStart

As you can gather from the material and name, this is a font material preset for a TMP_Text component. Unfortunately this error is not linked to a specific instance, so I don’t actually know which text is causing it, but I’m getting 7 identical errors like this when I enter the relevant scene.

Some further notes regarding this:

  • I’m using a modern version of the TMP package
  • Not all TMP_Texts using this material get this error. In my scene I have about 50 and most of them trigger no error
  • I’ve tried re-creating this specific material preset from scratch, but the issue remains
  • My project is using both asset bundles and addressables, so it’s not out-of-the-question that the material instance that’s causing the error is not from the project itself

My end-goal is to get rid of this error simply because it’s cluttering the logs.
I figure the most correct way to do this would be to resolve the issue, but if anybody has a solution that simply makes this error not appear I’d be cool with that too.

In general, I would be happy to hear if anyone ever ran across something like this. I’ve tried Googling for it but no dice so far.

Thanks in advance!