Enter collider and exit from other side?

Hello.
I am making a game where I need the functionality of passing through a box (2D).
I have a 2D box collider that is encapsulating the wall sprite.
Now, I want to trigger something if and only if the user entered the wall from one side and exited from the OTHER side of the wall, not just touch the collider.
How can I do that? I thought about having two box colliders on each side but that is not possible having 2 colliders of same type on one object.

What can I do?

Can’t you just check the position of the object on the OnCollisionEnter2D() and OnCollisionExit2D()? If you convert the position of the object colliding with the wall to the local coordinates of the wall (Transform.InverseTransformPoint()), then it would be easy to tell which side…one position will be negative and one positive. For example if you are talking about the ‘x’ axis, a local position on left side will be negative and the right side positive.