Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: boussama on May 04, 2014, 10:53:19 AM

Title: Drag and Drop on an empty Grid
Post by: boussama on May 04, 2014, 10:53:19 AM
Hello, i am making a drag and drop system between two ScrollView that contain Grid for arrangement purpose.
The probleme is that the second ScrollView is empty so the Drop is not detected. I have Created a Box collider on the Grid and it worked fine but now it's interfering with the Drop Scroll View script and i can move any item.
Any idea how to solve this probleme ?
Title: Re: Drag and Drop on an empty Grid
Post by: ArenMook on May 04, 2014, 11:01:35 AM
Put the collider on the object that has a widget, not just a plain game object. ALT+SHIFT+W, ALT+SHIFT+C. Adjust depth to make it behind your items.
Title: Re: Drag and Drop on an empty Grid
Post by: boussama on May 04, 2014, 11:47:36 AM
how can i add the widget script to the grid because it's not there ?!
Title: Re: Drag and Drop on an empty Grid
Post by: ArenMook on May 05, 2014, 10:07:59 PM
Don't add it to the grid. Grid is just a script that arranges the children underneath its game object.

I mentioned the ALT+SHIFT shortcuts that will add a widget and give it a collider. Leave the grid alone -- this widget with a collider should be a separate object. Remove the collider from the grid.