public void Refresh() { if (!rendererFeature) { rendererFeature = GetRendererFeature(); } if (rendererFeature) { rendererFeature.SetActive(active); } atmosphereMaterial.SetFloat("_AtmoScatteringIntensity", scatteringIntensity); atmosphereMaterial.SetFloat("_AtmoScatterFarPoint", farPoint); atmosphereMaterial.SetFloat("_AtmoStartDist", startDistance); atmosphereMaterial.SetFloat("_AtmoEndDist", endDistance); atmosphereMaterial.SetFloat("_SunSize", sunSize); atmosphereMaterial.SetFloat("_SkyExposure", skyExposure); atmosphereMaterial.SetColor("_SkyTint", skyColor); atmosphereMaterial.SetColor("_GroundColor", groundColor); atmosphereMaterial.SetFloat("_SunBrightness", sunBrightness); atmosphereMaterial.SetFloat("_MaxScatteringValue", maxScatteringValue); atmosphereMaterial.SetFloat("_AtmosphereThickness", atmosphereThickness); atmosphereMaterial.SetFloat("_HorizonPoint", horizonPoint); atmosphereMaterial.SetFloat("_HorizonTransitionSmoothness", horizonTransitionSmoothness); }