OnCollisionStay is not returning anything

I have a physics-controlled ball using a rigidbody, and I wish to use the normal of its contact point with the level. I intend the end result to be that when a forward force is applied to the ball, the y direction of the force is brought parallel to the surface that the ball is travelling on.

Most sources would suggest that OnCollisionStay is the way to go, but whatever I do, I can’t get it to return any collisions whatsoever. The code I’m using follows Unity’s example from the script reference - I can’t do anything more with it until it actually works!

void OnCollisionStay(Collision collisionInfo)
    Debug.Log("I am colliding");
    foreach (ContactPoint contact in collisionInfo.contacts)
        Debug.Log(contact.thisCollider.name + "hit" + contact.otherCollider.name);
        Debug.DrawRay(contact.point, contact.normal * 100, Color.white);

Naturally, neither the Debug.Logs or the DrawRay are getting called at this stage.

I’ve tried messing around with the ball’s rigidbody collision detection and putting a kinematic rigidbody on the level, but nothing seems to make a difference.

It’s not much of an answer, but all it took was a restart of Unity. Similar things have happened before, I just didn’t remember! Tip of the day: If bulletproof code doesn’t work, restart Unity and it will.