Author Topic: Drag and Drop on an empty Grid  (Read 3379 times)

boussama

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Drag and Drop on an empty Grid
« 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 ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag and Drop on an empty Grid
« Reply #1 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.

boussama

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Drag and Drop on an empty Grid
« Reply #2 on: May 04, 2014, 11:47:36 AM »
how can i add the widget script to the grid because it's not there ?!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag and Drop on an empty Grid
« Reply #3 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.