unity check if connected to internet code example
Example: unity check for internet connection
//REACHABLE VIA LOCAL NETWORK OR CARRIER DATA
if (Application.internetReachability != NetworkReachability.NotReachable)
{
Debug.LogWarning("Connected to WiFi or Carrier network");
}