title: Unity not Changing Bool Value
body: <p>I am currently writing an application in C# with Unity, and I've hit a small stumbling block.  I'm trying to change the value of a <code>bool</code> in the <code>Update()</code> method of a class, but the value is unaffected by all attempts to change it.  Here's my code:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class ModalTextController : MonoBehaviour {
      public SpriteRenderer text;
      public GameObject objectToFollow;
      public float duration = 3.5f;
      private bool fadeOut = false;
      public bool dialog = false;
      private float startTime;
  
      public void FadeOut() {
          startTime = Time.time;
          fadeOut = true;
      }
  
      // Use this for initialization
      void Start () {
          startTime = Time.time;
          if (!dialog) StartCoroutine(waitToFade());
      }
  
      // Update is called once per frame
      void Update () {
          float t = Time.time - startTime;
          text.color = new Color(1f, 1f, 1f, Mathf.SmoothStep(0f, 1f, t));
  
          if (fadeOut) {
              t = Time.time - startTime;
              text.color = new Color(1f, 1f, 1f, Mathf.SmoothStep(1f, 0f, t));
          }
  
          // Follow the player
          Vector2 newPos = transform.position;
          newPos.x = objectToFollow.transform.position.x;
          transform.position = newPos;
      }
  
      IEnumerator waitToFade() {
          yield return new WaitForSeconds(duration);
          FadeOut();
      }
  }
  </code></pre>
  
  <p>All variables not explicitly defined in code are set via the Inspector.  I've done a bit of debugging on this, and the value only doesn't change when <code>FadeOut()</code> is called outside of <code>waitToFade()</code>.  Also, if I <code>print fadeOut</code> inside <code>FadeOut()</code>, it prints <code>True</code>, but, if I print the same value from inside <code>Update()</code>, it prints <code>False</code>.  How could I get this to return <code>True</code> from inside <code>Update()</code>?</p>