unity获取当前网络状态

/// <summary> 获取当前网络状态 </summary>
   public bool GetNetWorkState()
    {
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            return false;
        }
        return true;
    }

 

本文链接:

https://www.bobsong.net/143.html
1 + 2 =
快来做第一个评论的人吧~