Reputation: 4262
I am developing a 2d game with Unity. I have a popup settings dialog and When Player clicked settings button it coming to screen on the other objects.
Game objects have got Collider2d component and If a button over an game object which has Collider2d compopnent, Button click action doesn't work.
I use different layers and canvas, and I set z index -20 and more but result is same button click doesn't work.
Upvotes: 0
Views: 2758
Reputation: 4262
The problem was not only about collider overlapping. First part of the problem was image and button overlapping.
I removed the raycast target for Image components in a grid.
But already I can't click button when overlap with a 2d collider.
Upvotes: 2