Canvas UI masks not working on iPad Air 2

I’ve got a fairly simple setup to mask an image in UI:

  • Canvas

  • Mask (Canvas Renderer, Image (.png), Mask)

  • Image (Canvas Renderer, Image (.png))

In an empty project, with nothing else in a scene, this works properly on all devices, including our lowest-spec iPad Air 2. However, in our production project, this same setup does not work on iPad Air 2 – the image is completely visible, as if the mask was not even there. On all other devices the masking does work as expected.

Is there a reason why this particular setup wouldn’t work on-device in our project? The scene it’s in does contain a number of other UI canvases, but changing the sort order of this particular canvas to be before or after all other canvases doesn’t change the outcome.

Is there perhaps a hardware limitation we’re running into in-game, with many more objects in the scene and many more canvases being rendered? A depth/stencil buffer being an upper limit on the number of canvases or masked objects? A rendering order problem? This is the only device on which we’re having this problem (all of them support Metal).

Submit a bug report using Unity Bug Reporter, especially you already have a reproducible project.

Yeah, submitting a report presently. I noticed that a similar question has been posted before , with no resolution, but I’ll link it here in case I do receive an answer/solution.

Most of the time I use RectMask2D instead of Mask because it’s more efficient. Have you tried it instead?

1 Like

I’ve heard back from Unity and apparently this is a known issue. @_Daniel I’ll try your suggestion and reply back if I figure something out.

Oh, hm. I should specify that I’m using this image mask + image inside of a UI canvas. I’m having trouble getting a Sprite Mask + Sprite to work in the canvas – notably, just adding a Sprite Mask with right click → 2D Object → Sprite Mask creates the object, but it has a regular transform instead of a RectTransform when created. I don’t know if sprite masks will work in this context…