File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Assets/BossRoom/Scripts/Shared
Net/UnityServices/Lobbies Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,11 @@ public void QuitGame()
109
109
}
110
110
else
111
111
{
112
+ #if UNITY_EDITOR
113
+ UnityEditor . EditorApplication . isPlaying = false ;
114
+ #else
112
115
Application . Quit ( ) ;
116
+ #endif
113
117
}
114
118
}
115
119
}
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ void OnSuccess(Lobby lobby)
115
115
CurrentUnityLobby = lobby ;
116
116
m_LocalLobby . ApplyRemoteData ( lobby ) ;
117
117
118
+ // as client, check if host is still in lobby
118
119
if ( ! m_LocalUser . IsHost )
119
120
{
120
121
foreach ( var lobbyUser in m_LocalLobby . LobbyUsers )
@@ -126,7 +127,7 @@ void OnSuccess(Lobby lobby)
126
127
}
127
128
m_UnityServiceErrorMessagePub . Publish ( new UnityServiceErrorMessage ( "Host left the lobby" , "Disconnecting." ) ) ;
128
129
ForceLeaveLobbyAttempt ( ) ;
129
- m_ApplicationController . QuitGame ( ) ;
130
+ // no need to disconnect NGO, it should already be handled by NGO callback to disconnect
130
131
}
131
132
}
132
133
}
You can’t perform that action at this time.
0 commit comments