OnMouseDown() not firing, even though attached to collider under mouse.

I have a game object with a component attached with this code:

void OnMouseDown()
{
Debug.Log("Mouse down");
}

Clicking on it in the game does nothing. So I created a test component that does a raycast from the mouse, lists the colliders it hits, and sends those colliders a “OnMouseDown” message when I press F1:

void Update()
{

    if (Input.GetKeyDown(KeyCode.F1))
    {
        ListRaycasts();
    }
}

private void ListRaycasts()
{
    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit[] hits;
    hits = Physics.RaycastAll(ray);
    int i = 0;
    while (i < hits.Length)
    {
        RaycastHit hit = hits*;*

Debug.Log(hit.collider.gameObject.name);
hit.collider.gameObject.SendMessage(“OnMouseDown”);
i++;
}
}
When I press F1 while over the object, I see the object listed and its OnMouseDown method fires. Why doesn’t it fire when I click?

Is it set to be a trigger?

This function is not called on objects that belong to Ignore Raycast layer.
This function is called on Colliders marked as Trigger if and only if Physics.queriesHitTriggers is true.