- Home /
I can't hide a RawImagen in a camera view
Hi all, This should be a simple one but... Im trying to hide UI GameObjects for the camera disabling the layer where they are in (using Culling Mask), but the UI Objects don't disappear. Actually, when the Culling Mask of a camera is set to "Nothing", the UI Objects are still shown in the Game window. Right now I´m testing with only one camera. Thanks for your time,
What do you have your canvas render mode set to? If its "Screen Space Overlay" You ui is never seen by the camera because its render by the canvas component. If you like to make a Raw Image component invisible , just deactivate the component or the gameobject , or use a canvas group to disable it.
Thanks for your help. Yes, I am using Screen Space Overlay. I could deactivate the component but how would I make it visible to some cameras and not to others when using multiple cameras?
In Screen Space Overlay rebder nide the gui is never rendered to a camera but directly to the screen. If you like to have it rendered to a camera you have to use the ScreenSpaceCamera render mode in the canvas and supply a camera. Then the layers will work as you expect it for that supplied camera.
Answer by puyehue · Apr 30, 2015 at 07:54 AM
I've read and seen some tutorials and they seem to say that activating and deactivating layers associated to cameras is the why to go, that is, with GUI Texture.
Your answer
Follow this Question
Related Questions
How can you hide Canvas objects using Camera Culling Mask? 1 Answer
Canvas layer overrides child layer in light culling mask - Expected behavior? 0 Answers
UI with layer always displaying 0 Answers
Second UI camera only works when I refresh Clear Flags setting 1 Answer
Camera culling without layer mask 0 Answers