I’m making a Risk kind-of game and I’m using Ui Images for the countries, but my problem is that UI Button uses the image boundaries so if my countries overlap the input fails a bit.
Is there any way of modifing the collider unity uses for the button input detection ?
I’m open to other suggestions!
Try this then, add an event to the button. On the button click Add Component → Event Trigger
Click on Add New Event Type
Select PointerEnter and click on the plus button. Drag your button onto the slot that appears.
then in the drop down select RectTransform → SetAsLastSibling
Do that for each button and you should be sorted.
OK so that isn’t working for you, I’ve been thinking about what you might be doing. When you say overlap, does the currently selected territory expand so it’s larger than the others? Is that the issue?
Also, just thought of this, what if you create a transparent image of the territory that doesn’t overlap and use that as the button rather than the image of the territory the player can see?