Author Topic: best workflow for scroll view (example 7) items click script placement?  (Read 1663 times)

lalamax3d

  • Guest
i have a scroll panel (working fine, wohoo). dynamically filled from items(yeah, thats cool)..
now i want, each item when clicked tell its label name or some child info.
Precise questions are.
1- Do i need to put some script on item(prefab) for broad casting event? or as it has collider, it is doing this automatically?
2- Ideally, i have put some script on parent panel, where i want to listen all events(click) from child items. Do i need to reference all items first? (thats not fair or is it?)

hope to hear soon, thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: best workflow for scroll view (example 7) items click script placement?
« Reply #1 on: October 15, 2013, 02:48:24 PM »
Events arrive on colliders. You can have a deep hierarchy, but as long as it's under one collider, only that object will receive the event. If you put a script on that object, you can reference the components you need to make your life easier -- such as the label.