英文:
RectTransform's bottom border changes in one resolution but in other doesnt change
问题
我为Unity的不同分辨率创建了UI自动缩放功能,对所有分辨率都有效,但在我的手机上,分辨率为1080x2400,我在Unity中尝试过,对象的边界未正确拉伸,因此出现了间隙。
画布数值
问题的视频:https://youtu.be/ol_hz5ntY1g
英文:
I made UI auto scale for different resolutions from Unity, and it works well for all of them, but on my phone i have resolution 1080x2400, i tryed it in Unity and borders of object dont strech right, so there appears a gap.
Canvas values
Video of problem:https://youtu.be/ol_hz5ntY1g
答案1
得分: 1
问题在于您的滚动视图的纵横比是固定的
=> 但是最后的分辨率具有不同的纵横比,因此空间没有填充。
您应该使用拉伸布局来填充剩余的空间。
由于您顶部和底部的按钮区域似乎不会动态更改大小,您可以简单地将您的滚动视图设置为类似于以下内容:
根据您顶部和底部按钮区域的高度调整这些值
英文:
The issue will be that the aspect ratio of your scroll view is fixed
=> the last resolution has a different aspect ratio though so the space isn't filled.
You should rather use a stretched layout for the scroll view in order to fill up the remaining space.
Since your button areas at top and bottom seem to not change sizes dynamically you could simply set your scroll view to something like e.g.
adjusting those values according to your top and bottom button area heights
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论