I used the example provided by Unity (https://docs.unity3d.com/ScriptReference/UI.Graphic.html) to create a new visual UI component.
However, I now want to detect a click event on the newly created mesh. To do so I implemented the IPointerClickHandler interface but the click is detected when I click within the RectTransform box of the GameObject but not on the actual Mesh (which is outside of the RectTransform).
I tried the solutions suggested here for "NON-UI OBJECTS" https://stackoverflow.com/a/41392130/9989790 but with no success.
Any idea on how to do it?