private void InitLobby()
    {
        Debug.Log("Initializing a lobby listing prefab.");

        players.text    = lobby.MemberCount + "/" + lobby.MaxMembers;
        serverName.text = lobby.GetData("name");
    }
Пример #2
0
    private void OnLobbyEntered(Steamworks.Data.Lobby lobby)
    {
        // Return if we are the host
        if (Mirror.NetworkServer.active)
        {
            return;
        }


        myLobby = lobby;

        Debug.Log("We joined a lobby.");

        Debug.Log("Connecting mirror client to the id associated with the lobby.");


        Mirror.NetworkManager.singleton.networkAddress = lobby.GetData("id");


        if (!Mirror.NetworkManager.singleton.isNetworkActive)
        {
            Mirror.NetworkManager.singleton.StartClient();
        }
    }