Quantcast
Viewing all articles
Browse latest Browse all 2891

how do i fix this error? (textmeshpro version 2.1.6)

**I have a panel set as a child to a canvas and to this panel I added a text-textmeshpro text box as a child of the panel. As is, if i go into play mode and then exit play mode it works as expected but if I take a custom font created using TMP's font asset creator and use it as the font for the text box, then when I enter play mode then exit play mode I get the error below.**> Blockquote MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. UnityEngine.Object.get_name () (at <0e7c1c9367c544fa83b5270f5a69cf11>:0) TMPro.TMP_SubMeshUI.AddSubTextObject (TMPro.TextMeshProUGUI textComponent, TMPro.MaterialReference materialReference) (at Library/PackageCache/com.unity.textmeshpro@2.1.6/Scripts/Runtime/TMP_SubMeshUI.cs:214) TMPro.TextMeshProUGUI.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] unicodeChars) (at Library/PackageCache/com.unity.textmeshpro@2.1.6/Scripts/Runtime/TMPro_UGUI_Private.cs:1403) TMPro.TMP_Text.ParseInputText () (at Library/PackageCache/com.unity.textmeshpro@2.1.6/Scripts/Runtime/TMP_Text.cs:1902) TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@2.1.6/Scripts/Runtime/TMPro_UGUI_Private.cs:1644) TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@2.1.6/Scripts/Runtime/TextMeshProUGUI.cs:216) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:210) UnityEngine.Canvas:SendWillRenderCanvases()

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>