[SOLVED, read post #2]
Hi!
I'm having issues in a scene where I have two draggable panels.
This is the Hierarchy:
*Panel_DeckBuilder
**Sprite_A ( position -303,0,-1 scale 400x800, collider 400x800)
**Sprite (position 177,0,-2 scale 400x800, collider 400x800)
**Panel_A_Draggable (position -303,0,-1)
***Grid_A
**Panel_B_Draggable (position 177,0,-2)
***Grid_B
On Sprite_A I have a UIDragPanelContents script with Panel_A as draggable panel.
On Sprite_B I have a UIDragPanelContents script with Panel_B as draggable panel.
On Panel_A and Panel_B is attached a UIDraggablePanel script with the same settings.
GameObjects Grid_A and Grid_B have a UIGrid script attached.
At runtime I spawn objects inside these two grids.
The issue:
- Only the objects on Grid_B are dragged, no matter where I click
- The objects are dragged even if i click outside the sprite SPRITE_B
- If I set a lower Z position on SPRITE_A (for instance bringing it to -3 instead -1) and I leave SPRITE_B at the same Z (-2) It drags the objects on GRID_A and not the objects on GRID_B.
I thought it was a collider problem, I thought that maybe the colliders on the sprites are too big and the one nearer to the camera intercepts the clicks. But it seems it's not that.
Any idea ?
Thanks a lot