File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Assets/Scripts/ConnectionManagement/ConnectionState Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using Unity . Multiplayer . Samples . BossRoom . Shared . Net . UnityServices . Lobbies ;
3
+ using UnityEngine ;
4
+ using VContainer ;
2
5
3
6
namespace Unity . Multiplayer . Samples . BossRoom
4
7
{
@@ -8,7 +11,16 @@ namespace Unity.Multiplayer.Samples.BossRoom
8
11
/// </summary>
9
12
class ClientConnectedState : ConnectionState
10
13
{
11
- public override void Enter ( ) { }
14
+ [ Inject ]
15
+ protected LobbyServiceFacade m_LobbyServiceFacade ;
16
+
17
+ public override void Enter ( )
18
+ {
19
+ if ( m_LobbyServiceFacade . CurrentUnityLobby != null )
20
+ {
21
+ m_LobbyServiceFacade . BeginTracking ( ) ;
22
+ }
23
+ }
12
24
13
25
public override void Exit ( ) { }
14
26
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ public override void Enter()
34
34
//The "BossRoom" server always advances to CharSelect immediately on start. Different games
35
35
//may do this differently.
36
36
SceneLoaderWrapper . Instance . LoadScene ( "CharSelect" , useNetworkSceneManager : true ) ;
37
+
38
+ if ( m_LobbyServiceFacade . CurrentUnityLobby != null )
39
+ {
40
+ m_LobbyServiceFacade . BeginTracking ( ) ;
41
+ }
37
42
}
38
43
39
44
public override void Exit ( )
You can’t perform that action at this time.
0 commit comments