Unity UI Masking not working on Galaxy Note and Kindle Fire

I develop the game in Unity 5.2.2f1, and I use masking elements and images, and then create .apk for Android. On most Android devices, this works great, but on the Galaxy Note 5 and Kindle Fire HD, masking is not required.

It is also interesting that it works with Galaxy Note and Kindle Fire HD when I use the default resource, which is part of unity_builtin_extra, but not when I use .gif or .png for the image resource.

Mask Works on all Android devices:

It works for everything.

It works for everything.

The mask only works on some Android devices:

Not working in note 5

Not working in note 5

I also tried updating various settings, such as setting up cameras to forward rendering and turning on the 32-bit Display Buffer (as other posts suggested), but nothing has worked so far.

Any news or thoughts about this will be very helpful!

+5
source share
1 answer

In the past, I encountered a similar problem with UI Mask on Linux, an error is reported there.

Since they did not fix it, I would not be surprised if some other devices would have the same problem.

If the purpose of the mask is the user interface, you can use the 2D Rect Mask instead, which is more efficient, but only for the user interface and has some limitations.

As you can read in the document:

The limitations of the RectMask2D control are:

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

Benefits of RectMask2D:

  • It does not use a stencil buffer
  • No extra drawing calls
  • No material changes
  • Fast performance

In any case, I report a problem with a small project on a test bench so that they can check it and write a fix in the end.

In the meantime, we hope that 2DRectMask can be a workaround!

+1
source

Source: https://habr.com/ru/post/1244633/


All Articles