unity3d - How to ajust screen dynmically of unity game in android device? -


enter image description here hi.

i have read scaling-gui , image aspect ratio, , if it's lot of scripts , tutorials out there it's hard find way handle many different devices , screens.

but game doesn't need complicated, hope. scaling 2d gui quick fix making them % of value screen.width

the attached jpg shows problem need fix. first picture shows scene in kind of normal aspect ratio see whole (test) scene. pic 1 dragging view sideways, , important game elements disappear out of screen (this don't want). pic 2 on other hand showing unity scale scene see whole scene no matter how extreme widescreen make it.

and want; make scale scene sideways , not crop out of picture.. idea how make unity that?

create empty gameobject , attach following script everytime run game screen adjust

using unityengine; using system.collections;

public class screenadjust : monobehaviour {

void start () {     camera.main.aspect = 800f/1280f; } 

}


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -