Error with text in Inventory Build

I keep getting the following errors when I open the Inventory and hover over the Inventory and Equipment UI elements. Or when I hover the mouse over the items and the tooltip pops up. I tried to change the text to a more Medieval style, but it would not let me change it. The error just adds the font asset as [LiberationSans SDF]/[MedievalScript SDF]. And it’s a bug that I guess has to do with the Liberation font not having an Underline option. Although, I don’t know how to correct it without having to re-install TextMeshPro or create another TMP font with the underline option included. So I’m not sure if this is a course/Inventory asset bug or a TMP bug.

The character used for Underline is not available in font asset [LiberationSans SDF].
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
TMPro.TMP_Text:GetUnderlineSpecialCharacter (TMPro.TMP_FontAsset) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:6081)
TMPro.TMP_Text:GetSpecialCharacters (TMPro.TMP_FontAsset) (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMP_Text.cs:6007)
TMPro.TextMeshProUGUI:LoadFontAsset () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:574)
TMPro.TextMeshProUGUI:Awake () (at Library/PackageCache/com.unity.textmeshpro@3.0.6/Scripts/Runtime/TMPro_UGUI_Private.cs:121)

Not getting this with any of my copies of the course code, so I suspect it’s a TMP issue… of course, we’re not using Rich Text or underline in the default setup…

It may be that you need to install the TMP Essentials package (which Unity is supposed to prompt you to do when you first use TMPro in a project.

I resolved it. There was a material added to the text in the inventory canvas, Inventory slot, action slot, and Item tooltip that wasn’t in the first part of the Inventory course when it was just the sample Inventory setup. It happened when it was integrated into the current project when the material showed up. Once I deleted it, the error went away. Then re-saved the prefabs and haven’t had the error again.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms