Adding a border to a 2d scene

In the scene if you see that green area, It is my border. I made it so the camera can’t leave it but how to I do that for my character? Screenshot - 531ad81097e1b402dde2886fab89bfb7 - Gyazo

You could add 2d colliders around the edge. Or, you can clamp the movement so it can’t go pass a certain point.