关于手机设备网络类型的判断

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Net : MonoBehaviour
{
    public Text StrText;
    // Use this for initialization
    void Start () {
        
    }
    
    // Update is called once per frame
    void Update () {
        if (Application.internetReachability==NetworkReachability.ReachableViaCarrierDataNetwork)
        {
            StrText.text = "数据网络";
        }
        else if (Application.internetReachability==NetworkReachability.ReachableViaLocalAreaNetwork)
        {
            StrText.text = "WIFI";
        }else if (Application.internetReachability==NetworkReachability.NotReachable)
        {
            StrText.text = "没网";
        }
    }
}

 

关于手机设备网络类型的判断

上一篇:nginx-php类似nginx-lua的扩展


下一篇:Cisco路由器上传和下载IOS