Search Issue Tracker

Fixed in 1.4.0

Votes

1

Found in [Package]

1.2.0 ~ 1.3.0

Issue ID

1044726

Regression

No

[TextMeshPro] 3d text throws error and doesn't render when script component is reset via cogwheel

Package: TextMeshPro

-

TextMeshPro 3d text throws error and doesn't render when script component is reset via cogwheel. Refer the video attached

Steps to reproduce:
1) Create new project > Import text mesh pro from package manager.
2) Right Click in hierarchy > 3d Object > Text Mesh pro - text.
3) Reset Text Mesh pro script component via cogwheel in inspector.
4) Try entering any text in the input box.

Actual result : Observe "Missing reference exception" in the console and nothing renders in scene/game window.

Reproducible on Text mesh pro version : 1.2.2, 1.2.1, 1.2.0, 1.1.0, 1.0.21

Reproducible on Unity version : 2018.2.0b6, 2018.2.0b1, 2018.1.3f1, 2018.1.0b5,2018.3.0b6

Note: In 2018.3.0b6 Errors are not coming but the text is still not visible.

Environment : Windows and Mac

Stack trace :
MissingReferenceException: The object of type 'Mesh' 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.Mesh.SetSizedArrayForChannel (InternalShaderChannel channel, InternalVertexChannelType format, Int32 dim, System.Array values, Int32 valuesCount) (at C:/buildslave/unity/build/Runtime/Export/Mesh.cs:79)
UnityEngine.Mesh.SetArrayForChannel[Vector3] (InternalShaderChannel channel, UnityEngine.Vector3[] values) (at C:/buildslave/unity/build/Runtime/Export/Mesh.cs:92)
UnityEngine.Mesh.set_vertices (UnityEngine.Vector3[] value) (at C:/buildslave/unity/build/Runtime/Export/Mesh.cs:135)
TMPro.TMP_MeshInfo.ResizeMeshInfo (Int32 size, Boolean isVolumetric) (at C:/Users/gs1801/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.1/Scripts/Runtime/TMP_MeshInfo.cs:419)
TMPro.TextMeshPro.SetArraySizes (System.Int32[] chars) (at C:/Users/gs1801/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.1/Scripts/Runtime/TMPro_Private.cs:1382)
TMPro.TMP_Text.ParseInputText () (at C:/Users/gs1801/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.1/Scripts/Runtime/TMP_Text.cs:1696)
TMPro.TextMeshPro.OnPreRenderObject () (at C:/Users/gs1801/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.1/Scripts/Runtime/TMPro_Private.cs:1522)
TMPro.TextMeshPro.Rebuild (CanvasUpdate update) (at C:/Users/gs1801/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.1/Scripts/Runtime/TextMeshPro.cs:240)
TMPro.TMP_UpdateManager.OnCameraPreCull (UnityEngine.Camera cam) (at C:/Users/gs1801/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.2.1/Scripts/Runtime/TMP_UpdateManager.cs:118)
UnityEngine.Camera.FireOnPreCull (UnityEngine.Camera cam) (at C:/buildslave/unity/build/Runtime/Export/Camera.bindings.cs:294)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  1. Resolution Note (fix version 1.4.0):

    This behavior has been corrected and the fix will be available in the next release of the TMP package for Unity 2018.3 and up.

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.