create rect through script according to background image inside camera

I want to create a rect that is exactly the same position and size of my background image that is inside my camera.
P.S. i created the rect Problem occurs when i change the resolution,because unity deosn,t change the size and position of the rect according to resolution

rectR= new Rect(- cam.orthographicSize * Screen.width / Screen.height, -cam.orthographicSize, cam.orthographicSize * Screen.width / Screen.height, cam.orthographicSize2);
rectL= new Rect(0,-cam.orthographicSize, cam.orthographicSize * Screen.width / Screen.height, cam.orthographicSize
2);

i created 2 rect left and right one according to the dimensions of the camera may be it helps you