Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Fetch server's map before client loads their default map/scene, Steamworks/Mirror

Discussion in 'Multiplayer' started by EivindTH, May 19, 2022.

  1. EivindTH


    Feb 21, 2019

    Quick question, how am I supposed to update the online scene in a client's network manager based on Steamworks lobby information? Can I fetch the server game data when pressing "Join Game" so that the client loads whichever map the server has? What I've seen when searching is that the player joins the game, loads their default map from their NetworkManager.onlineScene, and using OnClientSceneChange() or something, it can then load the server map. However doesn't this seem awfully inefficient? Can I use NetworkManager.ServerChangeScene() to achieve this without having to reload the game for people already connecting, or use any other logic to set a client's loading map by fetching server game info before they actually start to load the map?
    I'm using steamworks and mirror, with a custom network manager that has OnClientConnect() and OnServerAddPlayer(). Also has a steamLobby that has callbacks for JoinLobby, HostLobby, RequestLobbyJoin etc...

    Thanks in advance.