I want to create a custom UI, specifically an action wheel which offers different actions depending on where or what was clicked. To do that, I create circle segments (slices). I also create a custom PolygonCollider2D
for each segment which has exactly the size of the segment.
The problem is that e.g. OnPointerEnter
events trigger only on the transform, the collider gets ignored. Because all my segment transforms are layered one on top of the other, only the uppermost slice receives events.
In the image, I moved the slices apart so you can see where the different transform are, but in game they will all have the same center origin.
How do I solve this, so that only when I enter the custom collider of a slice I receive pointer events, and not on the square transform?