So i use this script to set some emissions. Code (CSharp): DynamicGI.SetEmissive(renderer[i],colors[i] * Mathf.Lerp(targetStartEmissions[i],targetEmissions[i],currentPowerUpTime / fadeTime)); The lerp values range from 1.5 to 0.1 the colors are all white (1,1,1,1)... The problem is every thing gets super bright setting the value to 1.5 in the script is like setting it to 4.0 in the editor any one know what could cause this ?
Unity was removing the texture this code works but it looks like I need to skip/wait like 3 frames so he can update the illumination. Code (CSharp): private int frameCount = 0; private int framesToSkip = 15; private void PowerUp() { currentPowerUpTime += Time.deltaTime; frameCount ++; if(frameCount != framesToSkip) return; frameCount = 0; for(int i = 0; i < renderer.Length; i ++) { renderer[i].material.SetColor("_EmissionColor",colors[i] * Mathf.Lerp(targetStartEmissions[i],targetEmissions[i],currentPowerUpTime / fadeTime)); renderer[i].UpdateGIMaterials(); } This cant be the way to go.