Exemplo n.º 1
0
 void OnDisable()
 {
     if (sunProperties != null)
     {
         sunProperties.ambientMultiply = 1;
         sunProperties.Run();
     }
     RenderSettings.ambientMode = m_PrevAmbientMode;
 }
Exemplo n.º 2
0
    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 ();
        }
    }