Skip to content

Commit 2d83fcf

Browse files
Merge develop into feature/replace-guid-with-auth-playerid
2 parents b974e90 + cee7c1a commit 2d83fcf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Assets/BossRoom/Scripts/Client/UI/Lobby/LobbyUIMediator.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class LobbyUIMediator : MonoBehaviour
2828
GameNetPortal m_GameNetPortal;
2929
ClientGameNetPortal m_ClientNetPortal;
3030

31+
const string k_DefaultLobbyName = "no-name";
32+
3133
[Inject]
3234
void InjectDependenciesAndInitialize(
3335
LobbyServiceFacade lobbyServiceFacade,
@@ -63,6 +65,12 @@ void OnDestroy()
6365

6466
public void CreateLobbyRequest(string lobbyName, bool isPrivate, int maxPlayers, OnlineMode onlineMode)
6567
{
68+
// before sending request to lobby service, populate an empty lobby name, if necessary
69+
if (string.IsNullOrEmpty(lobbyName))
70+
{
71+
lobbyName = k_DefaultLobbyName;
72+
}
73+
6674
m_LobbyServiceFacade.CreateLobbyAsync(lobbyName, maxPlayers, isPrivate, onlineMode, OnCreatedLobby, OnFailedLobbyCreateOrJoin);
6775
BlockUIWhileLoadingIsInProgress();
6876
}

0 commit comments

Comments
 (0)