unity3d - How to ajust screen dynmically of unity game in android device? -
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
Post a Comment