static class Tools
{
//是否是WIFI
public static bool IsWiFI{ get { return Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork; } }
//是否是移动网络
public static bool Is4G{ get { return Application.internetReachability == NetworkReachability.ReachableViaCarrierDataNetwork; } }
//网络是否不可用
public static bool IsNotReachable{ get { return Application.internetReachability == NetworkReachability.NotReachable; } }
}
unity工具————网络判断
猜你喜欢
转载自blog.csdn.net/kill566666/article/details/80774396
今日推荐
周排行