How can I call OnMouseDown() from an outside script?

Is there a way for me to do something when an object is being clicked on without adding the functionality directly to that object. I’ve done something like this before with delegates, but I can’t remember how to do it or where those scripts are.


Basic method is to use a raycast from the camera through the mouse to find what you hit. Then do whatever as appropriate.