Author Topic: How to detect which object in table is being clicked?  (Read 1264 times)

spyridon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
How to detect which object in table is being clicked?
« on: June 17, 2014, 01:28:02 PM »
I have a table that lists a number of objects, not too different from the quest log example. But my problem is I'm not sure the best way to get which object is clicked on without adding a collider to every single object on the list - which is not acceptable becuase if I have that many box colliders it makes the scroll view so laggy that it's unusable.

Is there any way I could do a single collider, similar to how the UIDragScrollView works, and have it figure out which object is being clicked on? That way I do not have 100 colliders in the same window...?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to detect which object in table is being clicked?
« Reply #1 on: June 17, 2014, 02:10:31 PM »
100 box colliders won't make your scroll view unusable. Why would they? PhysX is pretty optimized, and the scroll view has a rigidbody so you moving it around just moves a rigidbody. You won't notice any difference between 1 collider and 100 colliders.