Skip to content

Commit adfc9b9

Browse files
committed
docs: Added better explanation for NetworkingManager callbacks
1 parent 065d8aa commit adfc9b9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MLAPI/Core/NetworkingManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ internal set
8787
}
8888
private ulong localClientId;
8989
/// <summary>
90-
/// Gets a dictionary of connected clients and their clientId keys
90+
/// Gets a dictionary of connected clients and their clientId keys. This is only populated on the server.
9191
/// </summary>
9292
public readonly Dictionary<ulong, NetworkedClient> ConnectedClients = new Dictionary<ulong, NetworkedClient>();
9393
/// <summary>
94-
/// Gets a list of connected clients
94+
/// Gets a list of connected clients. This is only populated on the server.
9595
/// </summary>
9696
public readonly List<NetworkedClient> ConnectedClientsList = new List<NetworkedClient>();
9797
/// <summary>
98-
/// Gets a dictionary of the clients that have been accepted by the transport but are still pending by the MLAPI.
98+
/// Gets a dictionary of the clients that have been accepted by the transport but are still pending by the MLAPI. This is only populated on the server.
9999
/// </summary>
100100
public readonly Dictionary<ulong, PendingClient> PendingClients = new Dictionary<ulong, PendingClient>();
101101
/// <summary>
@@ -149,7 +149,7 @@ internal set
149149
/// </summary>
150150
public bool IsConnectedClient { get; internal set; }
151151
/// <summary>
152-
/// The callback to invoke once a client connects
152+
/// The callback to invoke once a client connects. This callback is only ran on the server and on the local client that connects.
153153
/// </summary>
154154
public event Action<ulong> OnClientConnectedCallback = null;
155155
internal void InvokeOnClientConnectedCallback(ulong clientId)
@@ -160,7 +160,7 @@ internal void InvokeOnClientConnectedCallback(ulong clientId)
160160
}
161161
}
162162
/// <summary>
163-
/// The callback to invoke when a client disconnects
163+
/// The callback to invoke when a client disconnects. This callback is only ran on the server and on the local client that disconnects.
164164
/// </summary>
165165
public event Action<ulong> OnClientDisconnectCallback = null;
166166
internal void InvokeOnClientDisconnectCallback(ulong clientId)
@@ -175,7 +175,7 @@ internal void InvokeOnClientDisconnectCallback(ulong clientId)
175175
/// </summary>
176176
public event Action OnServerStarted = null;
177177
/// <summary>
178-
/// Delegate type called when connection has been approved
178+
/// Delegate type called when connection has been approved. This only has to be set on the server.
179179
/// </summary>
180180
/// <param name="createPlayerObject">If true, a player object will be created. Otherwise the client will have no object.</param>
181181
/// <param name="playerPrefabHash">The prefabHash to use for the client. If createPlayerObject is false, this is ignored. If playerPrefabHash is null, the default player prefab is used.</param>

0 commit comments

Comments
 (0)