Connecting twice to a game

If I connect to a game, Then disconnect from it and try to connect again, the in-scene network objects won’t spawn again. This is my disconnection code:

try
        {
            if (NetworkManager.Singleton.IsServer)
            {
                await LobbyService.Instance.DeleteLobbyAsync(lobby.Id);
            }
            else
            {
                await LobbyService.Instance.RemovePlayerAsync(lobby.Id, playerId);
            }
            Debug.Log("sucssefully dissconected from lobby");
            //shutdown
            try
            {

                NetworkManager.Shutdown();
                NetworkManager networkManager = GameObject.FindObjectOfType<NetworkManager>();
                Destroy(networkManager.gameObject);
                Debug.Log("Network manager was shut down succesfuly");
            }
            catch
            {
                Debug.Log("Network manager already shut down");
            }

        }
        catch (LobbyServiceException e)
        {
            Debug.Log(e);
        }
        SceneManager.LoadScene(0);
Destroy(networkManager.gameObject);

You’re not supposed to destroy the NetworkManager object. It’s in the “DontDestroyOnLoad” subscene for a reason! :wink:

Yes but if I don’t destroy it I have two of them and then I can’t even connect to a game. I will check If it is fixed in the new version

I destroy it because of this: Why am I getting 2 Network Manager objects?