I need to check if my mouse is over an object. The problem is that there are a ton of those same objects. Like A LOT of those objects. Do I have to add a script to every object that contains void OnMouseDown() or can I do something inside my main player script? I really need help with this and I cannot find an answer online because it hasnt been asked probably. If I do have to add a script to all those objects, will it slow down my game at all? Thanks and all tips are appreciated.
(If you want more information on what I am doing, I am trying to make a cover system in my game. Whenever my mouse is over an object, my player will move to cover in that specific cover area.) Thanks guys!!