I have a scene with a 2D screen on it. The screen has a Text Mesh Pro DropDown object on it. It’s been working as expected for over a year. I recently updated the FB SDK unity package and rebuilt the game. Was going through a regression test and discovered that the dropdown isn’t working and causes the game to softlock and I can’t figure out why.
As soon as I click the dropdown object it creates the dropdown list and starts rendering the list but TMP Pro is also adding a gameobject called ‘Blocker’ 3 levels up in the scene from the dropdown object in the scene heirarchy (as a child of the object that contains the canvas for the screen). The Blocker object has a Canvas component.
This object is generating the following error on every frame:
MissingComponentException: There is no 'CanvasRenderer' attached to the "Blocker" game object, but a script is trying to access it.
You probably need to add a CanvasRenderer to the game object "Blocker". Or your script needs to check if the component is attached before using it.
It also prohibits all input to the screen as well, softlocking the game.
I’ve reverted my changes for the FB SDK upgrade and I’m still getting this error so I’m a bit at a loss. I’m using TPM Pro version 3.0.6. Unity version 2020.2.3f1.
I saw on another post that there’s a setting on the TMP Pro DropDown component for ‘Raycast Target’ that causes the blocking of input so that it can render. I’ve tried turning that off but I get the same behavior either way.
I’m not sure where this object is coming from. I’ve tried all the usual unity ‘reset’ options. Re-importing assets, Checked the package manager for any updates, etc. I can’t seem to figure out how to get this working. Any ideas on what else to try to debug this?
Here’s the full stacktrace of the error message if this is useful:
MissingComponentException: There is no 'CanvasRenderer' attached to the "Blocker" game object, but a script is trying to access it.
You probably need to add a CanvasRenderer to the game object "Blocker". Or your script needs to check if the component is attached before using it.
UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.Canvas canvas, UnityEngine.Camera eventCamera, UnityEngine.Vector2 pointerPosition, System.Collections.Generic.IList`1[T] foundGraphics, System.Collections.Generic.List`1[T] results) (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/GraphicRaycaster.cs:329)
UnityEngine.UI.GraphicRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] resultAppendList) (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/GraphicRaycaster.cs:230)
UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] raycastResults) (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:262)
UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData (System.Int32 id) (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/InputModules/PointerInputModule.cs:280)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:542)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:528)
UnityEngine.EventSystems.StandaloneInputModule.Process () (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:282)
UnityEngine.EventSystems.EventSystem.Update () (at /Applications/Unity/Hub/Editor/2020.2.3f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:385)