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