- Home /
This question was
closed Oct 02, 2016 at 09:28 PM by
Zitoox for the following reason:
The question is answered, right answer was accepted
Shadow question
I wanted to see an object's shadow when it is disabled OR in a layer that the camera can't see. How do i do that?
Comment
$$anonymous$$aybe you could use a workaround and use the ShadowCasting$$anonymous$$ode.ShadowsOnly mode for the Renderer. This way, the object will be invisible but still cast shadows.
In code:
renderer.shadowCasting$$anonymous$$ode = ShadowCasting$$anonymous$$ode.ShadowsOnly;
Or, in the inspector:
https://docs.unity3d.com/ScriptReference/Renderer-shadowCasting$$anonymous$$ode.html
shadows.jpg
(44.4 kB)