- Home /
How to change Material Render Mode from Opaque to Fade during runtime?
Hi, I'm trying to make a seamless transition from outdoor to indoor scenes, as shown in the following clip:
So basically what I want to do first, is have the fading mesh receive shadows. After researching, I haven't found a way to have the mesh receive shadows if the render mode is Fade, so I've accepted that loss.
However I feel that there ought to be a way to change the render mode during runtime - that way I could have the mesh receive shadows (as it should) by being in the Opaque render mode at first, and then change to Fade right before it transitions to 0 opacity (and change back to Opaque when it fades in).
The other problem is that, when the fade begins, the mesh stops casting shadows. The mesh is only casting shadows when it completes the fade in or the fade out transition, not in between. I was wondering if there's a way to fix that.
Answer by arpitp24 · Sep 06, 2017 at 05:35 AM
Try this http://answers.unity3d.com/questions/1004666/change-material-rendering-mode-in-runtime.html @rvillanueva
I really need help with this too. Been trying for days. That answer didn't help me. I can't seem to figure out how to simply make an object change from opaque to fade and/or visa versa.
Your answer
Follow this Question
Related Questions
Missing shadows on custom steppedAtten shader 0 Answers
Shadows show in scene view but not game view/Camera 1 Answer
Game Breaking Shadow Rendering Issue 0 Answers
Shadow issue in urp on reflectice surface 0 Answers
Fading Issue 2 Answers