Author Topic: Confusion with Drag Drop Item  (Read 3119 times)

andrew2110

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Confusion with Drag Drop Item
« on: September 04, 2014, 06:04:36 AM »
After going through the tutorials and examples, I tried just adding in the element I need to work with to one of the included examples:

http://www.blueomega.me/NGUITrials1.mp4

The problem I seem to be having is when the element I want to work with is being dragged, the debug camera shows that the last hit item is always my "MonsterContainer" object. However when I move around one of the example objects, it works as you'd expect, and items can be dragged from one panel to another. Does anybody see what I've done wrong here? I've been stuck with this for far too long now so any help would be greatly appreciated.

Edit: On comparing what happens when my object gets moved around to what happens when the other objects get moved around, I can see that on the other objects the Box Collider component and UIDrag Scroll View components disable themselves where as on mine, they stay enabled always. I'm not sure how to make my object behave like this
« Last Edit: September 04, 2014, 06:31:28 AM by andrew2110 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Confusion with Drag Drop Item
« Reply #1 on: September 04, 2014, 10:59:41 AM »
The disabling of the collider happens in the UIDragDropItem script, line 208.