示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }