内容在Unity的UI中超出了滚动视图视口,但仅在Android上。

huangapple go评论74阅读模式
英文:

Content scales outside scrollview port in Unity's UI, but only on Android

问题

我的ScrollView的内容突然开始缩放到超出视口,这让我感到疑惑,因为它之前一直正常工作。

在Windows上仍然正常工作,并且我没有更改任何可能导致这种效果的脚本。

我发现了答案,将在下面分享。

英文:

I was wondering why the content of my scrollview suddenly began scaling to be outside the viewport of my ScrollView, which had worked fine up until then.

It still worked fine on Windows and I hadn't changed anything in scripts that should cause such an effect.

I discovered the answer which I will share below.

答案1

得分: 0

在Android上,事实证明滚动视图视口没有按预期工作,因为我在Android播放器设置中勾选了布尔值“禁用深度和模板”。取消勾选该布尔值并保存项目设置后,滚动视图视口再次按预期工作。

英文:

It turned out that the scrollview port didn't work as intended on Android because I had ticked the boolean "disable depth and stencil" in the Android player settings. After unticking the boolean and saving the project settings the scrollview port worked as intended again.

内容在Unity的UI中超出了滚动视图视口,但仅在Android上。

huangapple
  • 本文由 发表于 2023年7月24日 17:46:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76753232.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定