在Unity缩​​放问题 [英] Scaling issue in Unity

查看:175
本文介绍了在Unity缩​​放问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让团结游戏场景。不过,我似乎无法摆脱这个边界。或者,我似乎无法伸展我的背景,以适应整个屏幕。我需要这个比例为所有屏幕尺寸的工作。这里是正在发生的形象。

I am trying to make a game scene for Unity. However, I can't seem to get rid of this border. Or I can't seem to stretch my background to fit the whole screen. I need this scaling to work for all screen sizes. Here is an image of what is happening.

你可以清楚地看到蓝色包边,我不希望这样的情况发生被做。发生这种情况时,我在我的平板电脑上测试也是如此。相机尺寸5,但是,当我做一些调试,我注意到它给了我如7.15位置,当我触摸屏幕上。我怎么能规模都记录下来,我已经经历吨论坛搜索,没有人似乎是有这个问题。在先进的感谢!

You can clearly see the blue edging, when I don't want that to be happening. This happens when I test on my Tablet as well. The camera is of size 5, however, when I do some debugging, I notice it gives me positions such as 7.15 when I touch on the screen. How can I scale everything down, I have searched through tons of forums and no one seems to be having this issue. Thanks in advanced!

推荐答案

您使用的用户界面面板的背景?如果是这样尝试这些步骤。

Are you using UI panel for the background? if so try these step.

1 STRECH背景板,以适应整个画布大小

1st strech the background Panel to fit the whole canvas size

然后更改背景面板在各个方向伸展

then change the background panel to stretch in all directions

然后选择画布对象和渲染屏幕空间相机模式中,相机分配给它,并更改UI缩放模式,以规模与屏幕尺寸

Then select the canvas object and render mode for screen space camera, assign your camera to it and change the UI scale mode to 'scale with Screen size'

这篇关于在Unity缩​​放问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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