- Home /
Can't get DisableKeyword("_EMISSION") to work
I am trying to turn off emission via scripting, but when I do it has no affect: mat.DisableKeyword("_EMISSION");
Anyone know why ?
oh it does work you need:
mat.Disable$$anonymous$$eyword("_E$$anonymous$$ISSION"); mat.globalIllu$$anonymous$$ationFlags = $$anonymous$$aterialGlobalIllu$$anonymous$$ationFlags.EmissiveIsBlack; mat.SetColor("_EmissionColor", Color.black);
Shader.Disable$$anonymous$$eyword(“_E$$anonymous$$ISSION”); could work aswell, if the property is not defined in the property section of the shader
Your answer
Follow this Question
Related Questions
Emission not working on model 0 Answers
Is it possible to make emissive dice in Unity? 1 Answer
How to bake metallic reflexion from self illuminated static objects ? 0 Answers
How to get Bloom effect only on emissive materials HDRP Volume component 0 Answers
Using a sequence of frames as a material emissive map. 0 Answers