2D ignore collisions for some objects

I am trying to recreate this game in unity.

I can’t figure out a good way to contain the player to the world but not the enemies.

My initial idea was to have 4 2D box colliders bounding the world that would be ignored by the enemies.

However, it seems that Physics.IgnoreCollision has not yet been implemented for Unity2d.

I’d prefer not to use Math.Clamp to constrain the player’s movement. Is there a simple way to do this?

See this reference:

Ignore collision reference