I’ve had a series of scrollview that contains a series of buttons with images. However since upgrading to 5.3.4 the buttons are not being masked by the scrollview and remain visible.
The text component on the button however is being hidden. Why is just the text being hidden and not the image?
Before scrolling
You can see that only the text “Mud 2” is masked - the image isn’t
After scrolling
See how the ‘Dry Grass’ text is correctly masked - but the image isn’t?
As I said, I haven’t changed the code or the scene since upgrading and this is something I have only just noticed after upgrading. I’m guessing something UI based has changed in the update. What do I need to get them properly masked?
The buttons are comprised of a Button Script, a Image (main image), text and a Raw Image (to display the yellow cross)
Hi, only thing I can think of, is that you have accidentally assigned some non-UI material to those GameObjects that have Image components + texture tile images, and that way they don’t get masked. But then again, you should see warning about Stencil_property.
@matthewseaward - Another idea, have you tried replacing Mask component with newer Rect Mask 2D? Although I don’t like it as it craps out if container having mask component is rotated…
Yeah, the images aren’t UI sprites. They are materials and I’m applying the texture to be used as the image. Unity never had a problem with this before…
But your suggestion to use the newer Rect Mask 2D seems to have solved the issue! Thanks!
I Had the same Issue, I checked image Component on and checked maskable to true and it fixed the issue, same if it happens with TMP_Text, then go to Extra settings in the text component and set maskable to true and it will fix UI masking, this worked in mine.