Search Issue Tracker

Duplicate

Votes

0

Found in [Package]

preview.1 - 2.1.0, preview.1 - 3.0.0

Issue ID

1205806

Regression

Yes

[TMP] Multiple exceptions are thrown on creating "Input Field - TextMeshPro" GamObject

Package: TextMeshPro

-

On creating "Input Field - TextMeshPro" GamObject, NullReferenceException is throws and UnassignedReferenceException is thrown on Import TMP essentials resources, also MissingComponentException thrown continuously when editor in play mode, refer attached video

Steps to repro:
1. Create a new project with 2D Template
2. Hierarchy > right-click > UI > Input Field - TextMeshPro
3. TMP Importer > Import TMP Essentials
4. TMP Importer > Import TMP Examples & Extras
5. Enter in Play Mode

Actual Result:
On importing "Input Field - TextMeshPro" GamObject NullReferenceException is thrown, when TMP Essentials is imported UnassignedReferenceException is thrown and when editor is in play mode MissingComponentException is thrown continuously also "Input Filed - TextMeshPro" GameObject doesn't seen in Scene View.

Expected Result:
"Input Field - TextMeshPro" GamObject is created gracefully without any exception

Tested with Unity version: 2020.1.0a17

Package version found: preview.1 - 3.0.0, preview.1 - 2.1.0

Package version working fine: 2.0.1, 2.0.0

Environment:
Windows 10 and macOS 10.14

Stack trace:
1. NullReferenceException: Object reference not set to an instance of an object
TMPro.TextMeshProUGUI.Cull (UnityEngine.Rect clipRect, System.Boolean validRect) (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.1/Scripts/Runtime/TextMeshProUGUI.cs:370)
UnityEngine.UI.RectMask2D.PerformClipping () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/RectMask2D.cs:246)
UnityEngine.UI.ClipperRegistry.Cull () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Culling/ClipperRegistry.cs:46)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:197)
UnityEngine.Canvas.SendWillRenderCanvases () (at <a8a4e178b2784e37bf0f7dd4db81b61f>:0)

2. UnassignedReferenceException: The variable m_canvasRenderer of TextMeshProUGUI has not been assigned.
You probably need to assign the m_canvasRenderer variable of the TextMeshProUGUI script in the inspector.
TMPro.TextMeshProUGUI.Cull (UnityEngine.Rect clipRect, System.Boolean validRect) (at Library/PackageCache/com.unity.textmeshpro@3.0.0-preview.1/Scripts/Runtime/TextMeshProUGUI.cs:370)
UnityEngine.UI.RectMask2D.PerformClipping () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/RectMask2D.cs:246)
UnityEngine.UI.ClipperRegistry.Cull () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Culling/ClipperRegistry.cs:46)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:197)
UnityEngine.Canvas.SendWillRenderCanvases () (at <a8a4e178b2784e37bf0f7dd4db81b61f>:0)

3. MissingComponentException: There is no 'CanvasRenderer' attached to the "Caret" game object, but a script is trying to access it.
You probably need to add a CanvasRenderer to the game object "Caret". Or your script needs to check if the component is attached before using it.
UnityEngine.UI.MaskableGraphic.SetClipRect (UnityEngine.Rect clipRect, System.Boolean validRect) (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:134)
UnityEngine.UI.RectMask2D.RemoveClippable (UnityEngine.UI.IClippable clippable) (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/RectMask2D.cs:326)
UnityEngine.UI.MaskableGraphic.UpdateClipParent () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:246)
UnityEngine.UI.MaskableGraphic.OnDisable () (at F:/build1/2020.1.0a17/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:160)

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.