Fixed Screen Resolution

Is there any way i could fixed the screen resolution?
i mean if it played at 800x600, 1280x1024, 1280x720, or wide screen, the camera keep showing same scene, same height and same width… maybe by making the object bigger, or else…

2 Answers

2

You could have script which checks screen resolution then edits the cameras W and H variables, have look at possibly doing that.

check this page for dealing with screen resolutions by script:

and this:

You may also need to adjust the viewport to capture the same field of view with the camera.

i don't suggest to play with field of view. this change perspective and can cause view deformation. 60 (the default value) should simulate the natural eyes view. changing the value will cause fish eye effect... http://docs.unity3d.com/Documentation/Components/class-Camera.html

I say this as Unity likes to change the viewport when the res changes. OP wants to keep the view consistent throughout all resolutions, so a viewport change may be necessary to achieve this. I think jpc133's W H change does the same thing.

jpc133 right and i added a link to how to change the W and H with script. what he need to do is get the current screen res (desktop) and set the app screen res to be the same. this will make sure it wan't look stretched etc... changing the field of view may change perspective for any resolution.

Changing viewport and FOV are the same thing in this case, as I don't think there is a separate setting for FOV (angle based) is there? I could be wrong :D It's how much of the world view you can fit into your screen space. But yes, it is important to maintain Aspect to not distort the view. And I agree, traditional 'FOV' settings can cause a fish-eye effect. Maybe my terminology was wrong in this case :D I struggle to find another term to describe the world space view in viewport terms.