- Home /
GameObject not receiving shadows
I have a GameObject that has a material using the standard shader, which has the rendering mode set to transparent. I know that it will never pick up shadows in this mode, so when I no longer need the transparency, I change the rendering mode to opaque. Unfortunately, it wont pick up shadows again unless I pause the game and then resume. Is there any functions I can call to reset the render queue order or whatever it's doing a pause? Haha my shader knowledge is pretty terrible so sorry if i've used the wrong jargon :p
What code do you use to change the rendermode? Are you just changing the rendertype tag to "Opaque"? Or are you setting material.renderQueue = 2000?
I would say you create two materials, one using opaque, one using transparent shader and swap those.
I was setting the render mode via SetFloat("_$$anonymous$$ode", 0). And Ive found that it updates when you click on the material in the inspector, not just when you pause.
Your answer
![](https://koobas.hobune.stream/wayback/20220612113003im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to make shader outline without inner shadow? 0 Answers
How to make trees in a terrain transparent in runtime? 0 Answers
Combine Basic Shadow Shader and Transparency Shader in Unity 0 Answers
Shadows with Transparent Standard Shader? 2 Answers
(SOLVED) How to bake lightmaps with transparent cutout shader ? 2 Answers