Skip to main content
6 events
when toggle format what by license comment
Mar 1, 2016 at 12:49 comment added SanSolo Yes adding component by having an array is a possibility. But there would be more issues. For example, I don't just want to know if the object was clicked. I want to do something with that information. For example, change the clicked objects color. Considering all the things, raycasting remained the best solution.
Mar 1, 2016 at 12:39 comment added S. McGrady Oh Ok... that would be overkill. BUt i wanted to prove that raycasting is not the ONLY solution as had been asked. Also you could do a foreach on the gameObjects and add the script using gameObject.AddComponent<MyScript>()
Mar 1, 2016 at 9:52 review Late answers
Mar 1, 2016 at 12:14
Mar 1, 2016 at 9:37 review First posts
Mar 1, 2016 at 9:47
Mar 1, 2016 at 9:36 comment added SanSolo Actually can't use OnMouseDown() as I have many objects and attaching the script to each of them is not feasible
Mar 1, 2016 at 9:33 history answered S. McGrady CC BY-SA 3.0