Author Topic: Can't drag items in an UIDraggable Panel  (Read 3631 times)

flavoredCoffee

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 15
    • View Profile
    • CWGTech Unity & Programming blog
Can't drag items in an UIDraggable Panel
« on: August 27, 2013, 05:36:34 PM »
I've been banging my head against this all afternoon, and finally decided to come here for help (as I'm sure it's something simple I'm missing).

I want to make a scrollable set of labels & images that will scroll vertically either from a scroll bar or by dragging on the display.

I took a look at the sample code provided, and even went so far as adding the demo horizontal scrolling display (the one with the shoulder pads for 12,345 gold) into my scene.  That works as I'd expect, and I can scroll left and right by dragging across the display with the mouse.  I've removed the scroll bar and it all still works as I'd expect.

I then began to duplicate the setup using my own panel, grid and objects.  I have a panel set as UIDraggable Panel and UIPanel.  I then have a UIGrid under that as a child, and in turn I have 7 GameObject, each with a box collider (with trigger set) and a UILabel inside each one.

If I attached a horizontal scroll bar to my draggable panel, then I can scroll left & right as expected.  However at no point can I drag the individual objects in the list/grid.

As far as I can tell, I've copied the example, but obviously I'm missing something.  Any ideas?

Thanks,

CG


flavoredCoffee

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 15
    • View Profile
    • CWGTech Unity & Programming blog
Re: Can't drag items in an UIDraggable Panel
« Reply #1 on: August 27, 2013, 05:44:08 PM »
Of course, minutes after posting I figured it out...

Make sure your objects are in the same LAYER as the Grid, Panel & UI Root...