forked from hunterzonewu/unity-decompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMsgType.cs
More file actions
178 lines (176 loc) · 8.53 KB
/
MsgType.cs
File metadata and controls
178 lines (176 loc) · 8.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Decompiled with JetBrains decompiler
// Type: UnityEngine.Networking.MsgType
// Assembly: UnityEngine.Networking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 8B34E19C-EF53-416E-AE36-35C45BAFD2DE
// Assembly location: C:\Users\Blake\sandbox\unity\test-project\Library\UnityAssemblies\UnityEngine.Networking.dll
namespace UnityEngine.Networking
{
/// <summary>
/// <para>Container class for networking system built-in message types.</para>
/// </summary>
public class MsgType
{
internal static string[] msgLabels = new string[48]{ "none", "ObjectDestroy", "Rpc", "ObjectSpawn", "Owner", "Command", "LocalPlayerTransform", "SyncEvent", "UpdateVars", "SyncList", "ObjectSpawnScene", "NetworkInfo", "SpawnFinished", "ObjectHide", "CRC", "LocalClientAuthority", "LocalChildTransform", "PeerClientAuthority", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "Connect", "Disconnect", "Error", "Ready", "NotReady", "AddPlayer", "RemovePlayer", "Scene", "Animation", "AnimationParams", "AnimationTrigger", "LobbyReadyToBegin", "LobbySceneLoaded", "LobbyAddPlayerFailed", "LobbyReturnToLobby", "ReconnectPlayer" };
/// <summary>
/// <para>Internal networking system message for destroying objects.</para>
/// </summary>
public const short ObjectDestroy = 1;
/// <summary>
/// <para>Internal networking system message for sending a ClientRPC from server to client.</para>
/// </summary>
public const short Rpc = 2;
/// <summary>
/// <para>Internal networking system message for spawning objects.</para>
/// </summary>
public const short ObjectSpawn = 3;
/// <summary>
/// <para>Internal networking system message for telling clients they own a player object.</para>
/// </summary>
public const short Owner = 4;
/// <summary>
/// <para>Internal networking system message for sending a command from client to server.</para>
/// </summary>
public const short Command = 5;
/// <summary>
/// <para>Internal networking system message for sending tranforms from client to server.</para>
/// </summary>
public const short LocalPlayerTransform = 6;
/// <summary>
/// <para>Internal networking system message for sending a SyncEvent from server to client.</para>
/// </summary>
public const short SyncEvent = 7;
/// <summary>
/// <para>Internal networking system message for updating SyncVars on a client from a server.</para>
/// </summary>
public const short UpdateVars = 8;
/// <summary>
/// <para>Internal networking system message for sending a USyncList generic list.</para>
/// </summary>
public const short SyncList = 9;
/// <summary>
/// <para>Internal networking system message for spawning scene objects.</para>
/// </summary>
public const short ObjectSpawnScene = 10;
/// <summary>
/// <para>Internal networking system message for sending information about network peers to clients.</para>
/// </summary>
public const short NetworkInfo = 11;
/// <summary>
/// <para>Internal networking system messages used to tell when the initial contents of a scene is being spawned.</para>
/// </summary>
public const short SpawnFinished = 12;
/// <summary>
/// <para>Internal networking system message for hiding objects.</para>
/// </summary>
public const short ObjectHide = 13;
/// <summary>
/// <para>Internal networking system message for HLAPI CRC checking.</para>
/// </summary>
public const short CRC = 14;
/// <summary>
/// <para>Internal networking system message for setting authority to a client for an object.</para>
/// </summary>
public const short LocalClientAuthority = 15;
/// <summary>
/// <para>Internal networking system message for sending tranforms for client object from client to server.</para>
/// </summary>
public const short LocalChildTransform = 16;
/// <summary>
/// <para>Internal networking system message for sending information about changes in authority for non-player objects to clients.</para>
/// </summary>
public const short PeerClientAuthority = 17;
internal const short UserMessage = 0;
internal const short HLAPIMsg = 28;
internal const short LLAPIMsg = 29;
internal const short HLAPIResend = 30;
internal const short HLAPIPending = 31;
/// <summary>
/// <para>The highest value of internal networking system message ids. User messages must be above this value. User code cannot replace these handlers.</para>
/// </summary>
public const short InternalHighest = 31;
/// <summary>
/// <para>Internal networking system message for communicating a connection has occurred.</para>
/// </summary>
public const short Connect = 32;
/// <summary>
/// <para>Internal networking system message for communicating a disconnect has occurred,.</para>
/// </summary>
public const short Disconnect = 33;
/// <summary>
/// <para>Internal networking system message for communicating an error.</para>
/// </summary>
public const short Error = 34;
/// <summary>
/// <para>Internal networking system message for clients to tell server they are ready.</para>
/// </summary>
public const short Ready = 35;
/// <summary>
/// <para>Internal networking system message for server to tell clients they are no longer ready.</para>
/// </summary>
public const short NotReady = 36;
/// <summary>
/// <para>Internal networking system message for adding player objects to client instances.</para>
/// </summary>
public const short AddPlayer = 37;
/// <summary>
/// <para>Internal networking system message for removing a player object which was spawned for a client.</para>
/// </summary>
public const short RemovePlayer = 38;
/// <summary>
/// <para>Internal networking system message that tells clients which scene to load when they connect to a server.</para>
/// </summary>
public const short Scene = 39;
/// <summary>
/// <para>Internal networking system message for sending synchronizing animation state.</para>
/// </summary>
public const short Animation = 40;
/// <summary>
/// <para>Internal networking system message for sending synchronizing animation parameter state.</para>
/// </summary>
public const short AnimationParameters = 41;
/// <summary>
/// <para>Internal networking system message for sending animation triggers.</para>
/// </summary>
public const short AnimationTrigger = 42;
/// <summary>
/// <para>Internal networking system message for communicating a player is ready in the lobby.</para>
/// </summary>
public const short LobbyReadyToBegin = 43;
/// <summary>
/// <para>Internal networking system message for communicating a lobby player has loaded the game scene.</para>
/// </summary>
public const short LobbySceneLoaded = 44;
/// <summary>
/// <para>Internal networking system message for communicating failing to add lobby player.</para>
/// </summary>
public const short LobbyAddPlayerFailed = 45;
/// <summary>
/// <para>Internal networking system messages used to return the game to the lobby scene.</para>
/// </summary>
public const short LobbyReturnToLobby = 46;
/// <summary>
/// <para>Internal networking system message used when a client connects to the new host of a game.</para>
/// </summary>
public const short ReconnectPlayer = 47;
/// <summary>
/// <para>The highest value of built-in networking system message ids. User messages must be above this value.</para>
/// </summary>
public const short Highest = 47;
/// <summary>
/// <para>Returns the name of internal message types by their id.</para>
/// </summary>
/// <param name="value">A internal message id value.</param>
/// <returns>
/// <para>The name of the internal message.</para>
/// </returns>
public static string MsgTypeToString(short value)
{
if ((int) value < 0 || (int) value > 47)
return string.Empty;
string str = MsgType.msgLabels[(int) value];
if (string.IsNullOrEmpty(str))
str = "[" + (object) value + "]";
return str;
}
}
}