- Home /
Can I hide materials in Unity if they having culling off, or vice versa?
As an example, If i was to look at the material that has culling off, I can see it fine. But when I look through, say, a window, that material will not render. Is there a way to practically do this with a unity shader on the window?
if you want to hide a material simply uncheck the sprite renderer
Answer by ThomasAqtl · Apr 20 at 02:08 PM
I'm not sure I understand your question. You want to have control on wether you can see, or not, through an object using a given material ?
I'm kind of new to everything, and maybe a shader that checks for culling isn't the best way to go about it. I want to be able to hide certain game objects while looking through a lens. So without looking through the lens, the objects will all appear normal. But if i look through the lens, only some of the objects will disappear. For example, a man is wearing a hat, then when you look through the lens, you just see the man, and the hat doesn't render. Also, I would like to be able to do this without knowing what layers the game objects are on, and without knowing the render queue of the objects. I only know something like this is possible because I have seen it work, but I don't have the files for it so I don't know how it works.
Your answer
Follow this Question
Related Questions
how do I get this stylized look in unity? 1 Answer
URP - Render only whats inside a cube 2 Answers
Point Light Behave different from editor and IOS device 0 Answers
Some of the common materials turns pink in Unity 2018.4.30 0 Answers
Why the heck is not possible using Custom Shaders inside a Material inspector? 1 Answer