Skip to content

Lobby.IsValid still true after calling Lobby.Leave() #252

@MagnusMakesGames

Description

@MagnusMakesGames

Hello, I am having an issue with Lobby.Leave() in my game, when calling it, Lobby.IsValid is still true, and I can't join any other lobbies. Here is my Disconnect function:

public void Disconnect(bool returnToMenu = false)
{
Debug.Log("Disconnecting from lobby");

    if(NetworkManager.Singleton != null)
        NetworkManager.Singleton.Shutdown();

    if(currentLobby.HasValue)
    {
        currentLobby.Value.Leave();
        //currentLobby = null;
    }

    if(returnToMenu)
        SceneManager.LoadScene("MainMenu");
}

I have been trying to fix this issue for over a week now, if anyone knows of a solution please let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions