TMP HDRP works in Editor not in Build


I could use some help with importing ttf fonts in TMP + HDRP.

Unity 2021.2.f16 / TMP 3.0.6 / TMP 3.2.0.pre-3

I can import the fonts and creating the texture atlas works with good result in the Wizard.

I have installed the SRP shaders from the forum post on HDRP + TMP
Plans For Hdrp Compatibility For Tmp? page-2

When I assign the TMP_SDF-HDRP UNLIT Shader to the Material I get a Console Error. (Editing the shadergraph and adding the missing _ScaleResultA (float) clears the error but for this test i am running with the error)
Material ‘SmallTypeWritingMedium SDF Material’ with Shader ‘TextMeshPro/SRP/TMP_SDF-HDRP UNLIT’ doesn’t have a float or range property ‘_ScaleRatioA’
UnityEngine.Material:GetFloat (int)
TMPro.TextMeshProUGUI:GenerateTextMesh () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:2209)
TMPro.TextMeshProUGUI:OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:1670)
TMPro.TextMeshProUGUI:Rebuild (UnityEngine.UI.CanvasUpdate) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TextMeshProUGUI.cs:216)
UnityEngine.Canvas:SendWillRenderCanvases ()

And I get below in the editor which is what I expect/want

But when I run the scene the Fonts are in the scene but a very odd blue color but the font is correct

But, when I create a build and run I get no fonts displaying at all

I could use some help trying to figure out what is going on here?

Thank you for checking this out!

Make sure that you are using version 3.2.0-pre.3 with Unity 2020.3 or newer.

Since TMP Essential Resources have been updated in this new release which includes new shaders for both URP and HDRP, you will need to re-import the TMP Essential Resources by using the "Window - TextMeshPro - Import TMP Essential Resources" menu option.

Note: Before importing the updated TMP Essential Resources, be sure to remove the older shaders that you downloaded from the forum. These would be located in the "TextMeshPro/Shaders" folder. If this is a new project, you can actually delete the whole "TextMesh Pro" folder and then re-import the TMP Essential Resources.

Thanks for getting back to me

I still get the same behavior after creating a new project and perform the steps to upgrade to TMP 3.2.0-pre.3


I noticed that the error "Material 'SmallTypeWritingMedium SDF Material' with Shader 'TextMeshPro/SRP/TMP_SDF-HDRP UNLIT' doesn't have a float or range property '_ScaleRatioA' UnityEngine.Material:GetFloat (int)" is no longer showing in the console.

Thank you for your time

I got the same problem about Material doesn't have a float or range property '_ScaleRatioA' can you tell me how to fix it

FIXED: ok you can edit shader by shader graph and add float '_ScaleRatioA' then save asset Done

I have the same, shader from essentials definitely does not have that property in TMP Pro 3.2 pre4

If I recall correctly I think that I deleted the existing TMP folders, re-imported TMP, then installed essentials and then reconverted the font file and I no longer had the error.

It seemed like an issue with some older TMP files from an older version or something in my case.