Author Topic: Having trouble with scrolling a UITable and clickable cells inside...  (Read 3601 times)

astanton81

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
So I have a UITable set up and I can add cells and everything no problem, and it scrolls with the cells in there when I click anywhere in the table and drag.  The cell is just duplicates of a prefab with different data in them for each cell.

I'm now trying to make the cells clickable.  I added the UIButton and Box Collider scripts to my cell prefab.  And the click event and stuff happens when I click on the cells.

The problem now though is that when I try to click and drag from a cell, it is hitting the collider for the cell and not the scroll view, so I can't click/drag and scroll the table from the cell.

What is the correct way to do this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Having trouble with scrolling a UITable and clickable cells inside...
« Reply #1 on: March 22, 2015, 08:27:01 AM »
You need to attach UIDragScrollView to all colliders inside the scroll view.

astanton81

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Having trouble with scrolling a UITable and clickable cells inside...
« Reply #2 on: March 22, 2015, 09:27:31 AM »
Awesome, worked like a charm, thanks!