- Home /
UI Mask doesnt work with Screen Space - Camera canvas?
Yeah so i was trying to use the ui mask for my hud to realize a nice boss health bar. so i put it all together and it worked in the scene view.
then i tested ingame and it does not work. it doesnt mask its contents. not at all.
so i switched it to screen space- overlay and it worked again. but it doesnt work with screen space - camera. can somebody confirm this? is it a bug? it also doesnt work with worldspace mode. do i have to setup something in order for it to work?
Answer by Baconation · Aug 23, 2019 at 07:14 AM
I know this is an old issue but I believe I have found the solution for others that find this page. I was trying to use a mask in the screen space - camera, but certain UI elements would not conform to the mask, exiting its bounds while still being visible. In order to fix this I changed out my masks for 2DRectMask components and they worked as normal.
Hope this helps.
Your answer
Follow this Question
Related Questions
Strange Canvas behaviour at Screen Space - Camera mode? 0 Answers
Screen Space - Camera to Screen Space - Overlay switch issue 0 Answers
Particle System not showing over "Screen Space - Overlay" UI Canvas 0 Answers
Why canvas set to Screen Space - Overlay doesn't cover entire screen 0 Answers
Is there a way to make a Texture2D screenshot that ignores the canvas? 3 Answers