title: fog in unity with c#
body: <p>I am trying to get fog to get denser over time in unity3d with c# script</p>
  
  <p>in start i turn it on as following code shows</p>
  
  <pre><code> void Start () {
      RenderSettings.fog =true;
      RenderSettings.fogDensity = 0.00f;
   }
  </code></pre>
  
  <p>in update i check every 3 seconds and add to density as following code shows</p>
  
  <pre><code> void Update () {
        StartCoroutine(updateTheFog());
   }
  </code></pre>
  
  <p>and the updateTheFog function is</p>
  
  <pre><code>IEnumerator updateTheFog(){
  
      yield return new WaitForSeconds(3); 
  
      RenderSettings.fogDensity+=0.01f;
  }
  </code></pre>
  
  <p>the problem is that it waits for the 3 seconds and then just automatically goes to 1.0 instead of going incremently by 0.01 every 3 seconds</p>
  
  <p>Any help getting this worked out is appreciated</p>