简体   繁体   English

unity如何使滚动视图儿童缩放以适合手机屏幕?

[英]unity how to make scroll view children scale to fit screen on mobile?

they say a picture is worth a thousand words so please check the image attached, right now my scroll view doesnt fill the screen on mobile devices, it does fill the screen in the editor, each child added is anchored to the top left and falls just short of filling the screen ive used every component i should be, canvas scaler, layout elements etc, but i cant get it to (match parent) fill the screen on mobile devices! 他们说一张照片值一千个单词,所以请检查附件中的图像,现在我的滚动视图没有填满移动设备上的屏幕,而是填满了编辑器中的屏幕,添加的每个孩子都被锚定在左上角并落在我无法使用我应该使用的每个组件,画布缩放器,布局元素等填充的屏幕,但我无法(匹配父级)填充移动设备上的屏幕! 在此处输入图片说明 any help appreciated 任何帮助表示赞赏

You should follow tutorial : Scroll View . 您应该遵循教程: 滚动视图

Few other things that you can try: 您可以尝试的其他一些方法:

  1. Use View Port. 使用查看端口。
  2. Select Child Force Expand options in Vertical Layout group. 在“垂直布局”组中选择“子力展开”选项。
  3. In Game View choose phone's resolution/display instead of "Free Aspect" to see how it would look in phone. 在“游戏视图”中,选择手机的分辨率/显示方式(而非“自由宽高比”)以查看其在手机中的外观。

Besides, "Header" is only child in layout group, which is already visible. 此外,“页眉”是布局组中的唯一子项,该组已经可见。 try adding more items to see if scroll rect is are expanding. 尝试添加更多项目以查看rect rect是否正在扩展。

Let me know if you have any more questions. 如果您还有其他问题,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM