// Updates the UI to reflect the Player Count
 public void SetPlayerCount(int nPlayers, MultiplayerUIState uiState)
 {
     if (uiState == MultiplayerUIState.Server)
     {
         statusText.text = $"Currently hosting {nPlayers} players";
     }
 }
        // Updates the UI based on the client's status
        public void SetState(MultiplayerUIState uiState)
        {
            currentState       = uiState;
            statusText.enabled = true;

            switch (uiState)
            {
            case MultiplayerUIState.PreConnect:
                statusText.text = "Not connected. Press S to start a server.";
                break;

            case MultiplayerUIState.Client:
                statusText.text = "Connected";
                break;

            case MultiplayerUIState.Server:
                statusText.text = "Hosting";
                break;
            }
        }