OnCollisionStay2D is ignoring collisions

I’ve got two gameobjects with 2D collider components on them. One of them is a prefab that’s instantiated on top of the other. Neither has rigidbody components, so there isn’t physics at work messing with this. The script attached to the prefab has this snippet in it:

private void OnCollisionStay2D(Collision2D collision)
        Debug.Log("there was a collision");

The colliders are clearly overlapping, yet no collision is being detected. Am I missing something here?

Collide only happen when there is a RigidBody2D attached to at least one of the object.
If you want to get the collide event but don’t want they affect to each other, you can make one of them a trigger (check the IsTrigger toggle on the BoxCollider2D component), of course, you have to attach a RigidBody2D component to it.