basic 2D camera setup

Hey I’m new to unity and I was wondering how to make the camera move left or right when the player reaches the edge of the camera and stop when it reaches the edge of the game area?

From assets store, download “Unity Projects: 2d platformer” (1st in top free). They used same script as you need (CameraFollow.cs).

Or - Here