示例#1
0
        /// <summary>
        /// Sets the sun intensity
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="volumeProfile"></param>
        public static void SetSunSettings(Light light, GaiaLightingProfileValues profile)
        {
            if (light == null)
            {
                light = GetSunLight();
            }

            if (profile.m_useKelvin)
            {
                profile.m_lWSunColor = GaiaUtils.ExecuteKelvinColor(profile.m_kelvinValue);
            }
            if (light != null)
            {
                light.color            = profile.m_lWSunColor;
                light.intensity        = profile.m_lWSunIntensity;
                light.shadows          = profile.m_shadowCastingMode;
                light.shadowStrength   = profile.m_shadowStrength;
                light.shadowResolution = profile.m_sunShadowResolution;
            }
        }