Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Authentication Hang

Discussion in 'Unity Remote Config' started by MousePods, Mar 20, 2023.

  1. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    I posted my thread in the wrong forum.

    Using the code below causes a hang for 2 - 3 seconds. Is this a known issue?

    Code (CSharp):
    1. Utilities.CheckForInternetConnection()
    Is there going to be a async version of this and should this be used when checking for internet when authenticating?

    I am getting no answers in the Authentication forum (probably because its remote config).

    Is there any insight into this?

    Thanks
     
  2. jcbadboy

    jcbadboy

    Joined:
    Mar 24, 2010
    Posts:
    59
    I'm having a similar problem on my side.
    I have thuis webgl game, running on a local react server.

    1. Utilities.CheckForInternetConnection()
    When I call the method, the browser process halt and go on 100% of cpu alocation. (because I have a 9900k it's get 10% ~of the total cpu of the machine.)

    I'm right now removing this internet test (CheckForInternetConnection) from my webgl builds, and will keep it on other platforms where it is more meningful.
     
  3. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    128
    I also found this to be super slow, and not actually required. Just do authentication as usual, but catch the relevant exceptions. Preemptively checking for internet connectivity doesn't achieve anything. You have to handle no internet connectivity on all the calls anyway, in the event the user had connectivity but lost it.