Search Issue Tracker

Fixed in Preview.2 - 2.1.0

Votes

0

Found in [Package]

2.0.1, 2.0.0, 1.4.1

Issue ID

1197291

Regression

Yes

[TMP] TextMeshPro is unusable due to MissingReferenceException error when "TMP Examples & Extras" is imported.

Package: TextMeshPro

-

TextMeshPro becomes unusable along with MissingReferenceException error when "TMP Examples & Extras" is imported.

Steps to repro:
1. Create a new project
2. Hierarchy > Create > 3D Object > Text - TextMeshPro
3. TMP Importer Window > Import TMP Essentials
4. TMP Importer Window > Import TMP Examples and Extras

Actual Result:
TextMeshPro becomes unusable along with MissingReferenceException error

Expected Result:
TMP Examples and Extras package gets imported gracefully.

Reproducible on:
2020.1.0a13

Working Fine in:
2020.1.0a12, 2019.3.0b10

Package found version: 2.0.1, 2.0.0, 1.4.1

Environment:
Windows 10 & macOS 10.14.

Stack trace:
MissingReferenceException: The object of type 'TMP_FontAsset' 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 <57266f6ec6ea4160887a8fcfd613f5ff>:0)
TMPro.TMP_FontAsset.ReadFontAssetDefinition () (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_fontasset.cs:671)
TMPro.TMP_FontAsset.get_characterLookupTable () (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_fontasset.cs:139)
TMPro.TMP_FontAssetUtilities.GetCharacterFromFontAsset_Internal (System.UInt32 unicode, TMPro.TMP_FontAsset sourceFontAsset, System.Boolean includeFallbacks, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isAlternativeTypeface, TMPro.TMP_FontAsset& fontAsset) (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_fontassetutilities.cs:157)
TMPro.TMP_FontAssetUtilities.GetCharacterFromFontAsset (System.UInt32 unicode, TMPro.TMP_FontAsset sourceFontAsset, System.Boolean includeFallbacks, TMPro.FontStyles fontStyle, TMPro.FontWeight fontWeight, System.Boolean& isAlternativeTypeface, TMPro.TMP_FontAsset& fontAsset) (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_fontassetutilities.cs:60)
TMPro.TextMeshPro.SetArraySizes (TMPro.TMP_Text+UnicodeChar[] chars) (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmpro_private.cs:1092)
TMPro.TMP_Text.ParseInputText () (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_text.cs:1716)
TMPro.TextMeshPro.OnPreRenderObject () (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmpro_private.cs:1530)
TMPro.TextMeshPro.Rebuild (UnityEngine.UI.CanvasUpdate update) (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/textmeshpro.cs:241)
TMPro.TMP_UpdateManager.DoRebuilds () (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_updatemanager.cs:187)
TMPro.TMP_UpdateManager.OnCameraPreCull (UnityEngine.Camera cam) (at library/packagecache/com.unity.textmeshpro@2.0.1/scripts/runtime/tmp_updatemanager.cs:158)
UnityEngine.Camera.FireOnPreCull (UnityEngine.Camera cam) (at <57266f6ec6ea4160887a8fcfd613f5ff>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.