Make camera have a fixed screen size

Hello all

I have a game, which I have created a 2D background for. This background is 480x240 pixels, and I want my game camera to always be this screen size, so my background image is always shown at that size. But how can I do that?

Please help me with this question. Thanks in advance.

You can use gameObject.camera.pixelRect to fix it to a certain size.

Refer: Unity - Scripting API: Camera.pixelRect