no 'CanvasRenderer' attached to the "Caret" game object

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.CanvasRenderer.EnableRectClipping (UnityEngine.Rect rect) (at <7e0e20f383154bcfa6b81aff2d09857f>:0)
UnityEngine.UI.MaskableGraphic.SetClipRect (UnityEngine.Rect clipRect, System.Boolean validRect) (at /Applications/2020.1.0f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MaskableGraphic.cs:145)
UnityEngine.UI.RectMask2D.PerformClipping () (at /Applications/2020.1.0f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/RectMask2D.cs:245)
UnityEngine.UI.ClipperRegistry.Cull () (at /Applications/2020.1.0f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Culling/ClipperRegistry.cs:46)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Applications/2020.1.0f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:197)
UnityEngine.Canvas.SendWillRenderCanvases () (at /Users/builduser/buildslave/unity/build/Modules/UI/ScriptBindings/UICanvas.bindings.cs:72)

I try to play a scene with a TMP Input Field in it, and nothing appears and I get this error repeatedly. If I disable the GameObject holding the TMP Input Field, everything appears normally - but no Input Field, which I need. Any ideas?

Make sure that you are using appropriate version of the TMP package for the version of Unity that you are using.

The latest releases of the TMP package are:

Version 1.5.1 for Unity 2018.4
Version 2.1.1 for Unity 2019.4
Version 3.0.1 for Unity 2020.x

Since changes related to the CanvasRenderer being a required component was changes in recent Unity releases, make sure you are using the latest release of 2018.4 or 2019.4 or 2020.1 or 2020.2.

2 Likes

That helped me. I was about to give up.

Still, it’s too bad you can’t have meta information with each release of Unity that suggests what package versions to use.

Regardless, thanks for the post!