File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Assets/BossRoom/Scripts/Shared Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
1
2
using System . Collections ;
2
3
using BossRoom . Scripts . Shared . Net . UnityServices . Auth ;
3
4
using Unity . Multiplayer . Samples . BossRoom . Client ;
6
7
using Unity . Multiplayer . Samples . BossRoom . Shared . Net . UnityServices . Infrastructure ;
7
8
using Unity . Multiplayer . Samples . BossRoom . Shared . Net . UnityServices . Lobbies ;
8
9
using Unity . Multiplayer . Samples . Utilities ;
9
- using Unity . Netcode ;
10
10
using UnityEngine ;
11
11
using UnityEngine . SceneManagement ;
12
12
@@ -88,7 +88,15 @@ private void OnDestroy()
88
88
/// </summary>
89
89
private IEnumerator LeaveBeforeQuit ( )
90
90
{
91
- m_LobbyServiceFacade . ForceLeaveLobbyAttempt ( ) ;
91
+ // We want to quit anyways, so if anything happens while trying to leave the Lobby, log the exception then carry on
92
+ try
93
+ {
94
+ m_LobbyServiceFacade . ForceLeaveLobbyAttempt ( ) ;
95
+ }
96
+ catch ( Exception e )
97
+ {
98
+ Debug . LogError ( e . Message ) ;
99
+ }
92
100
yield return null ;
93
101
Application . Quit ( ) ;
94
102
}
You can’t perform that action at this time.
0 commit comments