Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Online Check - Verify Internet reachability

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, May 24, 2017.

  1. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    Online Check

    Online Check
    is a simple, configurable tool to reliably check your connection to the Internet – in the editor as well as at runtime, where you need it, when you need it.

    Unity’s internal reachability check returns the type of Internet reachability possible on the current device.

    As mentioned in their documentation, this does not check for your actual connectivity – it only determines whether the device can, for example, connect to a hot spot. That’s not very helpful if it the actual route to the network is unavailable.

    Its main purpose is to gain a little bit more comfort by keeping track of your connection state, without consulting your browser or the OS display which both usually cause an unnecessary delay. This tool doesn’t check if you’re connected to a specific network. It checks if you have access to the Internet, which, for example, comes in handy when you’re on the road connected to a public WiFi.

    Features:
    Internet connectivity

    • Reliably check for Internet connectivity:
      • Run on Start: Run the check as soon as the scene loads
      • Manual Mode: Check whenever you need it
      • Endless Mode: Automatically check continuously between intervals
      • Fallback check: Keeps checking in case of connection loss
    • Freely configurable intervals
    • Maximum 8 KB of data downloaded per hour (at 10 checks per minute)
    • Industry grade captive portal detection methods:
      • Google204
      • GoogleBlank
      • MicrosoftNCSI
      • Apple (HTTPS)
      • Ubuntu
    • Verify a custom URL (e.g. to check if a server is alive)
    • Specialized checks for each platform:
      • Windows / WSA (UWP)
      • MacOS / iOS
      • Linux / Android
      • Generic for all other platforms and devices

    Documentation & control
    • Test the checks in the editor!
    • Powerful API for maximum control!
    • Proxy manager for Internet connections!
    • Detailed demo scenes!
    • Comprehensive documentation and support!
    • Full C# source code in the PRO version!

    2.3.Compatibility
    • Supports all build platforms!
    • Works with Windows, Mac and Linux editors!
    • Compatible with Unity 5.3 – Unity 2018
    • PlayMaker actions!


    Some impressions:

    Screenshot_25-Jun-2017-23-11-48-2.png

    Screenshot_25-Jun-2017-23-12-22-0.png


    Video:




    AssetStore:
    PRO edition
    Standard edition

    Our other assets


    Demos:
    WebGL
    Windows
    Mac
    Linux
    Android


    Feel free to download and test it.
    Any constructive comments are very welcome!


    So long,
    Stefan
     
    Last edited: Jul 3, 2018
  2. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    We've created a basic tutorial video:

     
  3. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    375
    Hi there, I just bought the pro version for learning processes mainly. Nice asset works really well :)

    I was hoping you could clarify something for me?

    What is the reason for the IntervalMin and Max values, is there some issue with polling at a regular interval or something?
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    Hi David

    Thank you for buying our asset!

    Those two values are the random range for the polling. The reason is that you don't wanna get banned by one of the verification sites - a random interval helps :)

    I hope this answers your question.


    So long,
    Stefan
     
  5. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    375
    Thanks for the prompt response!

    Right ok that makes sense. And thats why you supply the fallback url? How much of an issue is that? Like how likely is it that you do get banned?
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    It's very unlikely to get any sorts of problems as long as you don't set the interval very low, e.g. all 0.5 seconds.
    This is why we limit the range to a minimum of 3 seconds. With the default settings, you will have an average of 7 seconds for a test. This should be accurate enough :)

    The fallback is only used if, for what ever reason, the main check fails.
     
  7. Weezel

    Weezel

    Joined:
    Apr 20, 2013
    Posts:
    24
    Hi, I have a couple of questions. Does this asset work on WebGL? Can it get the network SSID (also on WebGL)?
     
  8. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    Hi

    1. Yes it works with WebGL.
    2. No, it can't get the SSID.

    Cheers
    Stefan
     
  9. Weezel

    Weezel

    Joined:
    Apr 20, 2013
    Posts:
    24
    Thanks for the quick response!
     
    Stefan-Laubenberger likes this.
  10. pangsscn

    pangsscn

    Joined:
    Sep 11, 2017
    Posts:
    5
    Hi Stefan,
    I have bought the pro version, Can I check my socket server's status? and How to do?
    I just want to know the internet is connect and my socket server's status.
     
  11. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    Hi

    OC "only" tests if your app can connect to the Internet.
    It isn't intended to check if a specific server is alive - this is planned for an upcoming asset ;)

    However, if you wanna check the connection status of a socket, you could do it like this:
    Code (CSharp):
    1.  
    2. public bool isSocketConnected(Socket s)
    3. {
    4.    return !(s.Poll(1000, SelectMode.SelectRead) && s.Available == 0);
    5. }
    6.  
    I hope this is useful for you!


    Cheers
    Stefan
     
  12. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
  13. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    We've just released version 1.6.0. Main changes:
    • Network reachability added to OnlineCheck.cs:
      • new parameter for "OnOnlineCheckComplete"
      • new property "NetworkReachability"
      • new event "OnNetworkReachabilityChange"
    • Demo scenes improved
    • Documentation fixed
     
  14. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    The new version is in the store!
     
  15. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
  16. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    We've released version 1.6.1 of OC. Changes:
    • Editor integration improved
    • Official support for Unity 2018.1 & 2018.2
     
  17. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    The new version is in the store!
     
  18. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    We've just released version 1.7.0 of Online Check.
    Main changes:
    • Tests for WSA and Web improved
    • New detection methods Google204 and GoogleBlank added
    • General code improvements

    There is now also a brand-new WebGL demo available.
     
    Last edited: Jul 9, 2018
  19. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    933
    The new version is in the store!