Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For an experiment I need to be able to dynamically adjust the screen size of my device. I'm using a Nexus 5 (5") and want to fake the screensize to 2", 3", 4",.. See images:

enter image description here

enter image description here

Is this possible using Unity? I'm aware that I can easily place some planes right in front of my camera, but I'm looking for a proper solution.

share|improve this question
2  
You can set any screen resolution in the editor for testing. –  Code Clown Mar 23 at 10:33

2 Answers 2

up vote 0 down vote accepted
+50

You should set the camera background color to black and make your game play in the specified area and then programmatically change the settings of camera like size etc.
You can find more information on how to play with camera here: http://docs.unity3d.com/ScriptReference/Camera.html

share|improve this answer

In the editor's Game view, you can set the size that you'll see when you hit Play. Across the top of that view are buttons for screen resolution; the far left side has setting for screen size, and the right side has Maximize on Play.

share|improve this answer
    
as a side note , it will only work if the resolution you are targeting is smaller than the desktop resolution, otherwise there is no way as far as i know. So testing for Ipads retina display will be a problem if you don't have a 4k display. –  Raxvan Mar 27 at 16:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.