在统一的通用的屏幕分辨率为Android [英] Universal screen resolutions in Unity for Android

查看:248
本文介绍了在统一的通用的屏幕分辨率为Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的Andr​​oid开发。我派我的应用程序进行测试的一对夫妇的设备和一对夫妇被罚款,但一对夫妇不得不离开屏幕游戏的一半。在游戏场景,一切都很好有啥可在某些设备会造成这个?

I am new to Android development. I sent my app for testing on a couple of devices and a couple were fine, but a couple had the game half way off the screen. In the game scene everything is fine so what could be causing this in some devices?

我使用一个主相机设置为正交,这是一个简单的2D游戏。

I am using one main camera set to orthographic and it is a simple 2d game.

我想我犯的错误之一是没有使用正确的画布,所以我会让改进,但为什么会变成这样像这样的游戏场景,我不能用一个帆布?我必须解决的主摄像头的位置也?

I guess one of my mistakes was not using the canvas properly and so I will make improvements, but why would this be like this in the game scene where I cannot use a canvas? Do I have to fix the position of main camera also?

三江源这方面的帮助。

推荐答案

尝试用你的画布屏幕匹配模式玩耍。我会尝试扩大或缩小选项。这是pretty言自明,它要么缩小或扩大画布相匹配的宽度或显示器的高度(根据您的设​​置画布)。如果你坚持,看看商务部的帆布:

Try playing around with your canvas' screen match mode. I would try the expand or shrink option. This is pretty self explanatory, it will either shrink or expand your canvas to match the width or the height (depending on your settings for the canvas) of your display. If you're stuck, take a look at the doc for the canvas:

http://docs.unity3d.com/Manual/script-CanvasScaler.html

和的最后一件事是玩弄你的UI元素的锚位置。下面是锚位置的文档:

And the last thing is to play around with your UI elements' anchor positions. Here's the doc for the anchor positions:

http://docs.unity3d.com/Manual/UIBasicLayout.html

希望这有助于!

这篇关于在统一的通用的屏幕分辨率为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆