Search Unity

Question Client unable to reconnect to previous lobby with quick join

Discussion in 'Lobby' started by elzbeb, Jan 11, 2023.

  1. elzbeb


    Jul 30, 2020
    Hey, I recently reported a bug to the unity lobby team and wanted to see if other people are having the same issue as me, I have 2 scripts, the PlayerNetworkController which is calling the piece of code I sent below and is attached to the player prefab which is based on the unity 3d starter asset, and the NetworkManagerUI is a child of the Canvas in the hierarchy which itself has the buttons shown on screen as children. The thing is everything should work just fine as I am calling these lines of code OnNetworkDespawn

    Code (CSharp):
    1.         if (IsLocalPlayer)
    2.         {
    3.             Debug.Log($"SHOULD SIGN OUT");
    4.             Lobbies.Instance.RemovePlayerAsync(networkManagerUI._connectedLobby.Id, networkManagerUI._playerId);
    5.             NetworkManager.Singleton.Shutdown();
    6.         }  

    Attached Files: