Internet Reachability Verifier for Unity®

Application.internetReachability isn't enough for you?
Internet Reachability Verifier is for making sure that the internet can be truly reached.
This is done with a technique called "captive portal detection", which is used by operating systems e.g. to determine if they should present a network login screen.

Several methods for the captive portal detection are available, modeled after the way how large platform-holder companies implement it (such as Google, Microsoft, Apple and Ubuntu). You also have an option to use a custom way based on your own web hosting.

What features does Internet Reachability Verifier have?

Accompanying pdf manual contains more details of each feature listed below.

  • Automatically monitors and verifies internet reachability, implemented using a light-weight coroutine.
  • If internet connectivity stops working middle of your own networking and you get error codes from some networking library, you can ask for reverification of the internet reachability (this asset will not actively monitor loss of effective networking, as that would use up user's mobile data quota unnecessarily).
  • 13 different captive portal detection methods: Google204, Google204HTTPS, GoogleBlank, MicrosoftNCSI, MicrosoftNCSI_IPV6, Apple, Apple2, AppleHTTPS, Ubuntu, UbuntuHTTPS, MicrosoftConnectTest, MicrosoftConnectTest_IPV6, Custom.
  • Default setting is to automatically pick a suitable ("native") captive portal detection method by platform.
  • Optional delegate for matching returned data for using custom method.
  • Optionally append cache buster to url when using the custom method.
  • Detailed internet access status property (Offline, PendingVerification, Error, Mismatch, NetVerified).
  • Easy callback for listening to changes in the internet access status property (optional).

About the implementation:

  • Works with Desktop, Mobile and WebGL platforms.
  • No native code.
  • C# source code included.
  • Small footprint.
  • Maintained for Unity versions from the most recent one down to Unity 2017

Unity Forum Thread



2024-03-17, 1.4.1:
- Added new detection method: GoogleBlankHTTPS
- Optimized away some legacy code on newer Unity versions.
- Verified support for Unity 6.

2023-12-22, 1.4.0:
- HTTPS methods are now default on most platforms.
- Added documentation about how to use HTTP methods.

2023-12-19, 1.3.2:
- Fix editor testing

2023-12-17, 1.3.1:
- Fix building for Android

2023-10-27, 1.3.0:
- Fixes for Unity 2023.1+ compatibility.
- Cleanup - removed legacy code for Unity 3.x-5.x and Webplayer, Flash, NaCl platforms.

2020-09-23, 1.2.3:
- Fixes for Unity 2020.2+ compatibility.
- This is the last version to support legacy Unity versions from 3.5.7 to 5.6.6. (Likely support for Unity 5.6.7 will continue.)

2019-11-16, 1.2.2:
Fixes for Unity 2019.3+ compatibility:
- Verified support for Enter Play Mode without Domain/Scene Reload
- Removed GUILayer components

2019-02-18, 1.2.1:
- Lowered Android minimum sdk version requirement.

2019-02-08, 1.2.0:
- WebGL and Facebook platform support.
- Support for Android 9 security config, where cleartext http traffic is disabled by default (similar to iOS ATS).
- Compatibility verified up to Unity 2018.3.
- New detection methods: Google204HTTPS, UbuntuHTTPS, MicrosoftConnectTest, MicrosoftNCSI_IPV6, MicrosoftConnectTest_IPV6
   (the IPV6 ones can verify if the network is IPV6-capable!).
- UnityWebRequest is now used with Unity 2018.3+

// 2018-03-06, 1.1.3 - Fixed deprecation warning with latest Unity versions. Made responseHeaders related code bit more robust.
// 2017-04-12, 1.1.2 - Hotfix for Apple methods.
// 2017-04-06, 1.1.1 - Added tooltips and custom editor which can give some in-editor warnings of unsuitable configuration.
// 2016-08-27, 1.1.0 - Changed internal coroutine to wait using realtime instead of pauseable normal time. Also the getTimeWithoutInternetConnection is now realtime-based. Added forceReverification method which sets status to pending verification, which is also now internally noticed immediately. Exposed the time value settings to inspector. Added AppleHTTPS method (due to ATS) and waitForNetVerifiedStatus convenience helper coroutine. Fixed regression bug of running verification twice.
// 2015-05-21, 1.0.4 - Fixed Unity 5 Asset Store warning.
// 2015-03-26, 1.0.3 - Support for Unity 5. Made DontDestroyOnLoad optional. Also start/stop netActivity in OnEnable/OnDisable.
// 2014-09-15, 1.0.2 - Refined customMethodExpectedData check to support expected empty result. Added option to append use a "cache buster" query string when using custom method. Added getTimeWithoutInternetConnection().
// 2014-07-22, 1.0.1 - Added Apple2 method (now default for Apple platforms). Added explanation to documentation why custom method is recommended.
// 2014-06-18, 1.0.0 - Initial version.

Below:   Images from default and custom method examples


Did you like how this Internet Reachability Verifier package is built?

Also from Strobotnik for Unity®:
Klattersynth TTS
Pixel-Perfect Dynamic Text

Strobotnik is a member of the Unity Affiliate Program.