Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Terena on October 24, 2013, 06:25:14 AM

Title: Drag and Drop. I cant drop the items
Post by: Terena 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 ?
Title: Re: Drag and Drop. I cant drop the items
Post by: ArenMook 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.
Title: Re: Drag and Drop. I cant drop the items
Post by: Terena 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.
Title: Re: Drag and Drop. I cant drop the items
Post by: Maskawanian 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.