I am trying to change the emission scale (brightness value) from 1-0 in Unity through a script. I have defined different materials with 1, 0.75, ...0 brightness and kept them as child parts of this gameobject called 'Hologram'. On select method is called and the brightness value should be taken up by the 'targetObject' in a similar way as done for Color. But, I cannot find an analogous way of transferring the emission value. I tried using the way as suggested in this link https://answers.unity.com/questions/914923/standard-shader-emission-control-via-script.html, but that is throwing an error. Does anyone know how to solve this?
↧
trying to change emission scale through script- error
↧