You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs
+40-1Lines changed: 40 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,54 @@
10
10
11
11
namespaceUnity.Netcode
12
12
{
13
-
13
+
/// <summary>
14
+
/// The connection event type set within <see cref="ConnectionEventData"/> to signify the type of connection event notification received.
15
+
/// </summary>
16
+
/// <remarks>
17
+
/// <see cref="ConnectionEventData"/> is returned as a parameter of the <see cref="NetworkManager.OnConnectionEvent"/> event notification.
18
+
/// <see cref="ClientConnected"/> and <see cref="ClientDisconnected"/> event types occur on the client-side of the newly connected client and on the server-side. <br />
19
+
/// <see cref="PeerConnected"/> and <see cref="PeerDisconnected"/> event types occur on connected clients to notify that a new client (peer) has joined/connected.
20
+
/// </remarks>
14
21
publicenumConnectionEvent
15
22
{
23
+
/// <summary>
24
+
/// This event is set on the client-side of the newly connected client and on the server-side.<br />
25
+
/// </summary>
26
+
/// <remarks>
27
+
/// On the newly connected client side, the <see cref="ConnectionEventData.ClientId"/> will be the <see cref="NetworkManager.LocalClientId"/>.<br />
28
+
/// On the server side, the <see cref="ConnectionEventData.ClientId"/> will be the ID of the client that just connected.
29
+
/// </remarks>
16
30
ClientConnected,
31
+
/// <summary>
32
+
/// This event is set on clients that are already connected to the session.
33
+
/// </summary>
34
+
/// <remarks>
35
+
/// The <see cref="ConnectionEventData.ClientId"/> will be the ID of the client that just connected.
36
+
/// </remarks>
17
37
PeerConnected,
38
+
/// <summary>
39
+
/// This event is set on the client-side of the client that disconnected client and on the server-side.
40
+
/// </summary>
41
+
/// <remarks>
42
+
/// On the disconnected client side, the <see cref="ConnectionEventData.ClientId"/> will be the <see cref="NetworkManager.LocalClientId"/>.<br />
43
+
/// On the server side, this will be the ID of the client that disconnected.
44
+
/// </remarks>
18
45
ClientDisconnected,
46
+
/// <summary>
47
+
/// This event is set on clients that are already connected to the session.
48
+
/// </summary>
49
+
/// <remarks>
50
+
/// The <see cref="ConnectionEventData.ClientId"/> will be the ID of the client that just disconnected.
51
+
/// </remarks>
19
52
PeerDisconnected
20
53
}
21
54
55
+
/// <summary>
56
+
/// Returned as a parameter of the <see cref="NetworkManager.OnConnectionEvent"/> event notification.
57
+
/// </summary>
58
+
/// <remarks>
59
+
/// See <see cref="ConnectionEvent"/> for more details on the types of connection events received.
0 commit comments