Author Topic: UIDragObject + depth problem  (Read 3314 times)

Guiboune

  • Guest
UIDragObject + depth problem
« on: June 24, 2013, 05:15:04 PM »
Excuse me if the topic has already been answered but I am having trouble with what seems to be the UIDragObject component.

I have sprites in my scene that all have the UIDragObject component. Another script changes their depths. The thing is, when an object is under another and I click on the one that's on top of it (depth : 2), it selects the object under (depth : 1). Why ??

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDragObject + depth problem
« Reply #1 on: June 25, 2013, 01:19:43 PM »
Play mode clicking is determined by the collider, not depth. Depth is for drawing.

Guiboune

  • Guest
Re: UIDragObject + depth problem
« Reply #2 on: June 25, 2013, 02:22:17 PM »
.. and what is that exactly ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDragObject + depth problem
« Reply #3 on: June 25, 2013, 05:47:15 PM »
?

Guiboune

  • Guest
Re: UIDragObject + depth problem
« Reply #4 on: June 25, 2013, 06:08:16 PM »
Play mode clicking is determined by the collider, not depth. Depth is for drawing.

what's that play mode clicking ? I don't really understand

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDragObject + depth problem
« Reply #5 on: June 26, 2013, 12:27:48 PM »
When you hit the Play button, the game starts playing. Play mode clicking is clicking on the UI in your Game view while the game is playing.