Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: lalamax3d on October 15, 2013, 12:09:26 PM
-
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
-
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.