Author Topic: Drag and Drop. I cant drop the items  (Read 3484 times)

Terena

  • Guest
Drag and Drop. I cant drop the items
« on: October 24, 2013, 06:25:14 AM »
Hi.

I'm new to NGUI and I learned I guess almost every thing but there is one thing I could not figured out.
I'm trying to drag and drop prefabs to different game objects but it does not work.

I can pick and drag item but I can not drop it.

When I pick and drag the item, the prefab became child of my drag and drop root object but when I try to drop the object it just return to the container.
I'm using all the scripts drag and drop root / container / item and surface.

When I'm working the example scene of the NGUI, I can drag and drop items to different surfaces with no problem but when I try it on my own game it simple does not work. Any one can tell me why it can be ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag and Drop. I cant drop the items
« Reply #1 on: October 25, 2013, 12:12:52 AM »
Did you disable the collider of the object you're dragging? Without it, the object you're dragging will intercept the drop event.

Terena

  • Guest
Re: Drag and Drop. I cant drop the items
« Reply #2 on: October 26, 2013, 08:30:38 AM »
Thanks, I really dont know what was wrong and could not solve it so, I record my interface as a prefab and import it to my working drag and drop scene. So far it works right now.

Maskawanian

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Drag and Drop. I cant drop the items
« Reply #3 on: December 22, 2013, 11:59:43 PM »
I had a similar issue while following the tutorial. It was solved by adding a collider to the UIGrid object I was using.