Hello, is there a way to change Emission Color during runtime? The problem is that if you start the game by having Emission Color as Black, it seems that Unity discards the Emission part because it’s not used, so even if you change it by using material.SetColor(“_EmissionColor”, color) it does nothing, simply because that part of shader seems to be deactivated for performance reasons I guess. Is there a way to ‘reactivate’ that part of shader during runtime?
I know that I can just go through all materials and set their emissive color to 1, 1, 1 (RGB), but it’s a pain to do so.
2 Likes
material.EnableKeyword (“_EMISSION”); should work.
4 Likes
Thank you!
Uh, this is a hidden feature, how may users know this?
Is there any official docs on enabling keywords?
Yes, its in the docs, just click on the help button in your material inspector.