Is it possible to change the emission scale on unity 5’s standard shader at runtime ?
_EmissionScale can only be changed through the UI.
What i tried to do is to set the emission to a value higher than 0 and change the emissionColor through script, from black (no emission) to some arbitrary color.
The result is that the emission changes, but the glow and global illumitions remain absent.
Is there a way to change the emission at runtime ?
Changing the emission property using Material.SetColor() doesn’t update the GI.
The way to go is using DynamicGI.SetEmissive (which also seems to be faster), also, the trick is to multiply the color by the desired intensity (ie emission scale) :
DynamicGI.SetEmissive(renderer, new Color(1f, 0.1f, 0.5f, 1.0f) * intensity)
I suggest you to take a look at the DynamicGI class. If I remember well, if you change the Albedo or the Emission of a material or whatever property that should affect GI, you need to perform an update on some materials.
But after digging around the Unity documentation. For anyone that’s interested on a simple solution to help get them started on understanding emission changing