How to get input events working on MaskableGraphic correctly

I am using a UI object derived from MaskableGraphic. Input events do work but seem to be driven by the RectTransform rather than the underlying mesh.

I have tested this by clicking in a part of the element that is empty and the events still fire.

The only other solution I can come up with is to implement ICanvasRaycastFilter and manually raycast the underlying mesh, if it would even work.

All of this is done in script as it is all data driven at runtime.

I have added the following to the scene

  • EventSystem
  • Graphic RayCaster on Camera

is there another way to do this correctly?

@thebwd did you find a solution? I’m encountering the exact same issue