if(Application.internetReachability == NetworkReachability.NotReachable) {
Debug.Log("The current network is unavailable");
}else if(Application.internetReachability =NetworkReachability.ReachableViaCarrierDataNetwork)
{
Debug.Log("The current network is 4G or 3G");
}else if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork)
{ Debug.Log("The current network is WIFI");
}