|
Is there a way to automatically get a game made with Unity to fit to the numerous Android screen resolutions and densities? As for iOS we could just use a list with the various resolutions but as for Android there are just so many devices. It's impossible to create a list like that. Thanks for any help in advance.
(comments are locked)
|
this is the way to use in unity
Jan 05 '12 at 12:27 PM
robert_mathew
That won't necessarily look good on all devices
Jan 05 '12 at 09:58 PM
DaveA
(comments are locked)
|
|
Until 3.5b, you couldn't get the physical size of the screen for choosing good layout options. Now you can. I think it best to have at least 2 layouts you can choose from, based on resolution and screen size (DPI). Meaning, a small device with a low res screen will look better if you gear it toward that, but a small device with a high-res screen will look unuasable where that same layout would be just fine on a tablet screen. So you should have some to choose from. What's the equivalent version number of Unity for Windows to 3.5b? I'm using 3.4.2f3 with Windows. I'm quite new to Unity so I'm not too well acquainted with it yet. So I made a CameraCheck.js file and attached it to the game scene. The script's doing something like that so far: public var camera : Camera; function Start() { if ( Application.platform == RuntimePlatform.Android ) { } } I'm wondering now how to detect/get the proper screen resolution and how I control the camera with those values?
Jan 06 '12 at 10:38 AM
taar1
(comments are locked)
|
|
For earlier Unity versions; You can scale the gui with GUI.matrix. If you design the GUI for the lowest supported resolution, you can then scale up the GUI for the other resolutions, given they are of the same aspect ratio to not get a squashed look. If you plan on supporting different aspect ratios, then make designs for the lowest resolution aspect ratios. Obviously, it won't produce high end graphics for those with bigger resolution since it'll just scale up the graphics, but the elements will occupy the same amount of screen space. Thanks for the info. So with GUI.matrix I can scale the GUI but how do I get the resolution of the physical Android device? For instance the Nexus One has 480x800 pixels while the Galaxy Nexus has 720x1280. I don't know how I can get that information in the first place.
Jan 11 '12 at 01:47 AM
taar1
You can use Screen.currentResolution.width & Screen.currentResolution.height to know about the current resolution of your device.
Sep 06 '12 at 09:37 AM
appearance
(comments are locked)
|
