상세 컨텐츠

본문 제목

Unity Internet Connection

개발생활/Unity Engine

by 한국인맛집 2020. 5. 29. 17:11

본문

반응형

https://docs.unity3d.com/ScriptReference/NetworkReachability.html

 

Unity - Scripting API: NetworkReachability

Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close

docs.unity3d.com

 

 

 

 

인터넷 연결상태를 확인할수 있다.

 if (Application.internetReachability.Equals(NetworkReachability.NotReachable)){
 // Disconnect Internet         
 }
 else if (Application.internetReachability.Equals( NetworkReachability.ReachableViaCarrierDataNetwork)) {
 // Connect Internet Data network
 }
 else if (Application.internetReachability.Equals(NetworkReachability.ReachableViaLocalAreaNetwork)){
 // Connect WIFI
 }

 

반응형

관련글 더보기