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

Relay disconnects player due to inactivity when loading a scene in the editor.

Discussion in 'Unity Transport' started by michal_unity171, May 30, 2022.

  1. michal_unity171

    michal_unity171

    Joined:
    Apr 14, 2021
    Posts:
    4
    Hi,

    I have working Relay setup, that breaks when I load pretty big scene in Editor using
    UnityEngine.SceneManagement.SceneManager.LoadSceneAsync.
    Editor gets stuck for a few seconds, I guess when parsing or calling Awake...

    Relay in the meantime throws error:

    Received error message from Relay: player timed out due to inactivity. This could be due to an inappropriate value for reconnectionTimeMS when calling NetworkSettings.WithRelayParameters. Also make sure to schedule NetworkDriver updates frequently to avoid this error.

    I've tried rising and lowering the reconnectionTimeMS, but no luck. Unity locks for about 8 seconds.
    This works fine in build even though the game also locks for pretty similar time.

    How to work around this?
     
    alecmak likes this.
  2. Awix_Studio

    Awix_Studio

    Joined:
    May 18, 2022
    Posts:
    1
    Which Unity version do you use? I had the same problem on 2021.3.5, after change to 2021.2.17 everything works fine for me.