- Home /
Depth Mask / Reverse UI Mask for UI staying on screen even when disabled,Depth Mask / Reverse Mask in UI remain transparent even when disabled
Good morning,
I've tried using all the methods to make a part of the render transparent determined by other object, and most of them work, and they work very well on 3D objects. However, when I try to use it for UI Components, while they make transparent the different parts, they will make that transparent part of the screen like that forever, even if I translate, rotate or disable the component with the Material that caused it. If I move it, that part of the screen is also the same way.
(Third image: https://i.imgur.com/IbFDoQm.png )
I should mention that it happens both in case of Depth Mask ( http://wiki.unity3d.com/index.php?title=DepthMask ), Reverse UIMask / UIMasked ( https://github.com/slavaobninsk/UIMask )and several others, so it's not only one case. I've been trying to reach for answers but I haven't found anything, could you please help me?
Thank you and regards.
Answer by sormat · Nov 28, 2017 at 10:09 AM
Ok, by my own I found that changing the Canvas to Screen Space - Camera (instead of Overlay) allows to move the Depth Mask object and only making transparent the part I need to (and also disable it). I still don't know why this problem happens in Overlay, and now I have to make a few changes to adapt my UI to the Screen Space - Camera, but this is better than nothing.
Regards.