Hello,
I am trying to disable casting shadows of an object using ShadowCastingMode inside an editor window. I tried it and got an error, so I then tried the code at runtime and got the same error:
Unknown identifier: ‘ShadowCastingMode’.
Using the code:
function Start () {
var renderer = gameObject.GetComponent(MeshRenderer) as MeshRenderer;
renderer.shadowCastingMode = ShadowCastingMode.Off;
}
ShadowCastingMode is an enumerator so this code should work, or have I missed something?