public void ApplyLightingSettings(LightingSettings settings, float duration = 0f) { if (settings.overrideFog) { fogColor.Set(settings.fogColor, duration); fogDensity.Set(settings.fogDensity, duration); } ApplyLightOnly(settings.light, duration); if (settings.overrideSkybox) { skybox.Set(settings.skyboxTexture, duration); skyColor.Set(settings.skyColor, duration); } }
public void ApplyLightOnly(Light light, float duration = 0f) { if (light != null) { light.enabled = false; lightRotation.Set(light.transform.localRotation, duration); lightColor.Set(light.color, duration); lightIntensity.Set(light.intensity, duration); } }