void OnDisable() { if (sunProperties != null) { sunProperties.ambientMultiply = 1; sunProperties.Run(); } RenderSettings.ambientMode = m_PrevAmbientMode; }
void OnEnable() { sunProperties = GetComponent <SunProperties> (); m_TimeOfDayManager = FindObjectOfType <TimeOfDayManager> (); m_PrevAmbientMode = RenderSettings.ambientMode; RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Trilight; if (sunProperties != null) { sunProperties.ambientMultiply = ambientMultiply; sunProperties.Run(); } }
void OnEnable() { sunProperties = GetComponent<SunProperties> (); m_TimeOfDayManager = FindObjectOfType<TimeOfDayManager> (); m_PrevAmbientMode = RenderSettings.ambientMode; RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Trilight; if (sunProperties != null) { sunProperties.ambientMultiply = ambientMultiply; sunProperties.Run (); } }