using UnityEngine; public class SmoothCameraFollow : MonoBehaviour { [Header("Target & Offset")] [Tooltip("The Transform the camera should follow.")] [SerializeField] private Transform target; [Tooltip("Offset distance between the camera and the target.")] [SerializeField] private Vector3 offset = new Vector3(0f, 2f, -10f); [Header("Movement")] [Tooltip("How smoothly the camera catches up. Higher values mean faster tracking.")] [Range(0.1f, 20f)]
Write a C# script for Unity that makes the camera follow the player smoothly, with the follow speed and the offset from the player adjustable in the Inspector. The camera must stay inside minimum and maximum x and y bounds set in the Inspector. Do the movement in LateUpdate and explain why.

