- Home /
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.
Answer by anmolmahatpurkar · Jun 22, 2015 at 09:05 PM
You can use gameObject.camera.pixelRect to fix it to a certain size.
Refer: http://docs.unity3d.com/ScriptReference/Camera-pixelRect.html
Your answer
Follow this Question
Related Questions
Handling different resolutions? 2 Answers
Change camera FOV to keep 3d scene same size on screen, independently from resolution 0 Answers
How to letterbox the screen and have pixel perfection in a 2d game 0 Answers
Scaling Orthographic Camera Up 2 Answers
2D Game. Screen, Camera and coordinates. 0 Answers