Unity c# detects the current system network connection

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");

}

Guess you like

Origin blog.csdn.net/qq_21743659/article/details/130710977