GraphicRaycaster not hitting TextMeshPro Dropdown popup

I’m using the GraphicRaycaster component on the parent canvas to detect whether the pointer is hovering above a certain component. This does not work when mouse is hovering over the popup of a TMP_Dropdown component.

This is basically the exact same problem as here, with a single difference. In the linked question, they have this same problem with the normal Dropdown component, which is an issue because the Dropdown game object has it’s own GraphicRaycaster component. The solution to this is to use the GraphicRaycaster component attached to the same game object as the Dropdown component to detect hover over the Dropdown pop-up.

However, with the TMP_Dropdown, I cannot find a GraphicRaycaster component attached to the same game object. As such, the GraphicRaycaster on the parent canvas is completely not seeing the TMP_Dropdown popup, and I can’t find a way to solve this issue.

Hi @skillllzzzz,

Maybe easies solution will be adding GraphicRaycaster component to Background element in TMP_Dropdown hierarchy? So when you generate options through script code all of new elemnts will contain it.

Hope will do. Let me know!

191926-20220130-123543.png

I found that, while it wasn’t present when looking at the dropdown in the inspector, at runtime, a GraphicRaycaster component was being added to a “Dropdown List” gameobject (created at runtime), which was being created from the “Template” gameobject, shown below.

191932-screenshot-2022-01-31-010021.png

I had a script that I needed accessing the GraphicRaycaster component. I simply added this script to the “Template” gameobject, and this works!