android - Unity UI Masking 不适用于 Galaxy Note 和 Kindle Fire

标签 android mask galaxy unity3d

我正在 Unity 5.2.2f1 中开发游戏,我正在使用 Canvas 和图像 mask 元素,然后为 Android 构建 .apk。在大多数 Android 设备上,这工作正常,但在 Galaxy Note 5 和 Kindle Fire HD 上,掩码不起作用。

同样有趣的是,当我使用作为 unity_builtin_extra 资源一部分的默认提供 Assets 时,它确实在 Galaxy Note 和 Kindle Fire HD 上工作,但不是我使用 .gif 或 .png 作为图像 Assets 。

面具适用于所有 Android 设备:

This works on everything

This works on everything

Mask 仅适用于某些 Android 设备:

Does not work on Note 5

Does not work on Note 5

我也尝试过更新各种设置,例如将相机设置为正向渲染和启用 32 位显示缓冲区(正如其他帖子所建议的),但到目前为止没有任何效果。

如有任何线索或想法,我们将不胜感激!

最佳答案

过去,我在 Linux 上的 UI Mask 遇到过类似的问题,有一个 bug reported on it .

由于他们还没有修复它,如果其他一些设备也有同样的问题,我不会感到惊讶。

如果 Mask 用于 UI,那么您可以使用 2D Rect Mask相反,这更有效,但仅适用于 UI 并且有一些限制。

正如您在文档中所读:

The limitations of RectMask2D control are:

  • It only works in 2D space
  • It will not properly mask elements that are not coplanar

The advantages of RectMask2D are:

  • It does not use the stencil buffer
  • No extra draw calls
  • No material changes
  • Fast performance

无论哪种方式,我都会通过一个小型试验台项目报告您的问题,以便他们对其进行测试并最终为其编写修复程序。

与此同时,希望 2DRectMask 可以成为解决方法!

关于android - Unity UI Masking 不适用于 Galaxy Note 和 Kindle Fire,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35860009/

相关文章:

python - 从掩模计算图像的一部分的共现矩阵

jQuery 掩码不适用于加载的内容

android - 如何在通知中添加按钮?

java - applicationId 不能为空,但 xml 语法正确

android - react-native 如何使用链接打开本地文件 url?

android - Room、Kotlin、Dagger 2.15 android.app.Application 不能在没有@Inject 构造函数或@Provides 注释方法的情况下提供

跨浏览器剪切蒙版

android - Galaxy s4 分辨率文件夹

arduino - Arduino Mega ADK 2560 与三星 Galaxy S2 之间的 USB 通信

android - Android : INVALID_SCOPE 无法使用 Google+ 登录获取授权码