Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  3. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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:
    1,146
    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.6 – 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

    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: Oct 8, 2018
  2. Stefan-Laubenberger

    Stefan-Laubenberger

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

     
  3. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    379
    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:
    1,146
    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:
    379
    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:
    1,146
    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:
    1,146
    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:
    1,146
    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:
    1,146
  13. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    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:
    1,146
    The new version is in the store!
     
  15. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    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:
    1,146
    The new version is in the store!
     
  18. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    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:
    1,146
    The new version is in the store!
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    Unfortunately, one of our customers was very unhappy about our "update" and "review" reminders.
    We were under the impression that it's easy to postpone or disable those reminders, but I think it's a good idea to explain it once and for all ;)

    Per default, OC (and all our other assets) checks once per day for a new version. If there is a new version available, this window will appear:
    OC_Update.PNG

    • Yes, let's do it!: redirects to the Unity AssetStore to download the new version
    • Not right now: postpone the check for one day and ask again tomorrow
    • Don't check again!: the asset will no longer check for updates (= this window won't appear again)


    Since ratings and reviews are vital for us, we added a "review" reminder. After 13 days of usage (= used at least once per day), OC displays this window:
    OC_Reminder.PNG
    • Yes, let's do it!: redirects to the Unity AssetStore to rate the asset
    • Not right now: postpone the check for another 13 days of usage and ask then again
    • Don't ask again!: the asset will no longer ask for reviews (= this window won't appear again)

    The checks can also be enabled/disabled in the configuration:
    OC_Config.PNG

    I hope this clarifies the situation.


    Cheers
    Stefan
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    Important notice for all "standard" customers:

    We constantly try to push our assets to the next level by adding new features and deliver the best support for our customers. In the past we've kept updating the asset in a 2-month cycle. However, after careful consideration, we feel like this needs to happen at a faster pace. We've received numerous input from the community that a faster pace would help out a lot. Because Unity is ever evolving and we want to keep our assets relevant we need to be able to keep up the fast pace that is Unity's second nature. Packaging and maintaining a separate DLL-version poses a problem in regards to this goal.

    With this in mind, we decided to phase out the DLL-version by the end of August 2018.
    Besides being able to update the asset more often, we are convinced that phasing out the DLL-version in favor of the PRO version will also bring these improvements for our customers:
    1. More functionalities and supported platforms due the source code (e.g. WSA (UWP), IL2CPP under Android and Linux)
    2. Less frictions with different Unity versions within the same company
    3. Fast hotfixes and high priority support

    We understand that this may impact you negatively. However we hope with the upgrade-path we offer to you - our loyal DLL-customers - can alleviate your concerns and win you over once more:
    PRO edition

    Please rest assured we will continue to support and improve the PRO version over the years to come.

    I hope you understand our decision.


    Cheers
    Stefan
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    Last edited: Aug 21, 2018
  23. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    We've just released version 2018.2.0 of OC. Main changes:
    • Compile defines OC_AVAILABLE and OC_UNAVAILABLE added to test your app without connecting/disconnecting the Internet
    • WebGL demo added to store, forum etc.
    • Common 2018.2.0 added
    • Discord channel added
    • Standard version removed
     
  24. Stefan-Laubenberger

    Stefan-Laubenberger

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

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    Update regarding the deprecation of the standard package:

    The standard package is planned to be available (but no longer maintained) until December 2018. This will allow the transition to PRO with a 50% reduced upgrade-price for our existing customers.
    Afterwards, the package will vanish from the store and the upgrade path will become inaccessible.
     
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    We've just released version 2018.2.2 of OC. Main changes:
    • "Custom Check" is now an asset
    • WWW replaced with UnityWebRequest
    • OnlineCheck: ensure name is optional (see "Config")
    • UpdateCheck: runs in a separate thread
    • Common 2018.2.2 added
    • Tested with Unity 2018.3
     
    Last edited: Sep 23, 2018
    digiross likes this.
  27. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    The new version is in the store!
     
  28. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    206
    Hi Stefan,

    Tried your Discord, but couldn't find you amongst the tumbleweeds lol.

    Just wondering where you are supposed to check if the CustomCheck is alive as there is no callback like there is for the other three checks.

    Justin
     
  29. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    Hi Justin

    Sorry, I wasn't online the last few hours, but now I'm available in Discord.
    Would you like to discuss it there?


    Cheers
    Stefan
     
  30. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    206
    Thanks Stefan. I will ... and we did! :)
     
  31. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    We've just released version 2018.3.0 of OC. Main changes:
    • Singleton-behaviour for custom root objects improved
    • Minimum Unity version is now 5.6
    • PlayMaker-package updated
    • Common 2018.3.0 added
     
    SketchWork likes this.
  32. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    The new version is in the store!
     
  33. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    We've just released version 2018.3.1 of OC. Main changes:
    • Manager: "Reset"-method added
    • Proxy: Editor improved
    • Fixes for WSA
    • Updated to Common 2018.3.1
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    The new version is in the store!
     
  35. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    We've just released version 2018.4.0 of OC. Changes:
    • OnlineCheck.cs:
      • "Delay" added
      • "Timeout"-field added to set the timeout for every check
      • "RefreshYield" added
    • Updated to Common 2018.4.0
     
  36. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    The new version is in the store!
     
  37. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    All our assets are on the Cyber Sale and 30% off:

    https://goo.gl/qwtXyb



    This offer also applies for the upgrade paths - last chance to get a cheap upgrade to PRO!
     
  38. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,146
    Dear non-PRO users

    The end of the "standard" version is near and the available reduced upgrade path will disappear.

    We added an additional 30% reduction for the upgrade path during the Cyberweek-sale and we decided to leave it that way until we remove Online Check by the end of this month.
    This gives you a last opportunity to upgrade to PRO for only 35% (-65%) of the normal price.


    Regards
    Stefan