title: Checking internet connection at runtime in Unity
body: <p>How can I check internet connection inside Update Function in unity? I want to know whether the user is connected or not, and based on that just disable some functionality of my game.</p>
  
  <p>Seems like there is no question like this been asked here before or if it is, it just checking the connection in Start function. Here is the code I have so far:</p>
  
  <pre><code>void Update () {
  
      if (Application.internetReachability == NetworkReachability.NotReachable) {
          Debug.Log ("No internet access");
      } else {
          Debug.Log ("internet connection");
      }
  }
  </code></pre>