18 [Tooltip(
"Uses Unity's Application.internetReachability signal.")]
25 [Tooltip(
"Performs an actual network call (HTTP HEAD) to a known endpoint.")]
68 public string RequestUrl {
get;
set; } =
"http://unity.com";
77 const string requestMethod =
"HEAD";
80 var request = (HttpWebRequest)WebRequest.Create(
RequestUrl);
81 request.Method = requestMethod;
82 using var response = (HttpWebResponse)request.GetResponse();
83 return response.StatusCode == HttpStatusCode.OK;
string RequestUrl
Endpoint to probe with an HTTP HEAD request. Use a lightweight, highly available URL; defaults to "ht...
bool CheckInternetConnection()
Issues an HTTP HEAD request to RequestUrl. Returns true only if the server responds with 200 OK; any ...
Network I/O–based checker issuing an HTTP HEAD request to a configurable URL. Provides higher confide...
bool CheckInternetConnection()
Returns true when Unity reports the internet is reachable; false otherwise. This is a signal-level ch...
Lightweight checker based on Application.internetReachability. Optimized for mobile devices where it ...
bool CheckInternetConnection()
Checks network reachability/availability. Should return true when online and false when offline or un...
Contract for pluggable internet connectivity checkers. Implementations should return true when the ne...
CheckInternetConnectionType
Defines the strategy used to verify internet connectivity. Choose between a fast platform signal chec...
@ Request
Performs an actual network call (HTTP HEAD) to a known endpoint. More accurate but slower and can be ...
@ Simple
Uses Unity's Application.internetReachability signal. Fast and battery-friendly on mobile devices; re...