@@ -25,11 +25,9 @@ public interface ISessionPlayerData
25
25
/// <typeparam name="T"></typeparam>
26
26
public class SessionManager < T > where T : struct , ISessionPlayerData
27
27
{
28
- const string k_HostGUID = "host_guid" ;
29
-
30
28
NetworkManager m_NetworkManager ;
31
29
32
- protected SessionManager ( )
30
+ SessionManager ( )
33
31
{
34
32
m_NetworkManager = NetworkManager . Singleton ;
35
33
if ( m_NetworkManager )
@@ -51,23 +49,23 @@ protected SessionManager()
51
49
52
50
public static SessionManager < T > Instance => s_Instance ??= new SessionManager < T > ( ) ;
53
51
54
- private static SessionManager < T > s_Instance ;
52
+ static SessionManager < T > s_Instance ;
55
53
56
54
/// <summary>
57
55
/// Maps a given client player id to the data for a given client player.
58
56
/// </summary>
59
- private Dictionary < string , T > m_ClientData ;
57
+ Dictionary < string , T > m_ClientData ;
60
58
61
59
/// <summary>
62
60
/// Map to allow us to cheaply map from player id to player data.
63
61
/// </summary>
64
- private Dictionary < ulong , string > m_ClientIDToPlayerId ;
62
+ Dictionary < ulong , string > m_ClientIDToPlayerId ;
65
63
66
64
/// <summary>
67
65
/// Handles the case where NetworkManager has told us a client has disconnected. This includes ourselves, if we're the host,
68
66
/// and the server is stopped."
69
67
/// </summary>
70
- private void OnClientDisconnect ( ulong clientId )
68
+ void OnClientDisconnect ( ulong clientId )
71
69
{
72
70
if ( m_ClientIDToPlayerId . TryGetValue ( clientId , out var playerId ) )
73
71
{
@@ -96,7 +94,7 @@ public void OnUserDisconnectRequest()
96
94
Clear ( ) ;
97
95
}
98
96
99
- private void Clear ( )
97
+ void Clear ( )
100
98
{
101
99
//resets all our runtime state.
102
100
m_ClientData . Clear ( ) ;
@@ -203,7 +201,7 @@ public void SetPlayerData(ulong clientId, T sessionPlayerData)
203
201
/// <summary>
204
202
/// Called after the server is created- This is primarily meant for the host server to clean up or handle/set state as its starting up
205
203
/// </summary>
206
- private void ServerStartedHandler ( )
204
+ void ServerStartedHandler ( )
207
205
{
208
206
if ( m_NetworkManager . IsServer )
209
207
{
0 commit comments