private void ShowServerConnections()
{
this.m_ShowServerConnections = EditorGUILayout.Foldout(this.m_ShowServerConnections, this.m_ShowServerConnectionsLabel);
if (this.m_ShowServerConnections)
{
EditorGUI.indentLevel++;
if (this.m_ShowDetailForConnections == null)
{
this.m_ShowDetailForConnections = new List<bool>();
this.m_ShowPlayersForConnections = new List<bool>();
this.m_ShowVisibleForConnections = new List<bool>();
this.m_ShowOwnedForConnections = new List<bool>();
}
while (this.m_ShowDetailForConnections.Count < NetworkServer.connections.Count)
{
this.m_ShowDetailForConnections.Add(false);
this.m_ShowPlayersForConnections.Add(false);
this.m_ShowVisibleForConnections.Add(false);
this.m_ShowOwnedForConnections.Add(false);
}
int num = 0;
foreach (NetworkConnection connection in NetworkServer.connections)
{
if (connection == null)
{
num++;
}
else
{
this.m_ShowDetailForConnections[num] = EditorGUILayout.Foldout(this.m_ShowDetailForConnections[num], string.Concat(new object[] { "Conn: ", connection.connectionId, " (", connection.address, ")" }));
if (this.m_ShowDetailForConnections[num])
{
EditorGUI.indentLevel++;
this.m_ShowPlayersForConnections[num] = EditorGUILayout.Foldout(this.m_ShowPlayersForConnections[num], "Players");
if (this.m_ShowPlayersForConnections[num])
{
EditorGUI.indentLevel++;
foreach (PlayerController controller in connection.playerControllers)
{
EditorGUILayout.ObjectField("Player: " + controller.playerControllerId, controller.gameObject, typeof(GameObject), true, new GUILayoutOption[0]);
}
EditorGUI.indentLevel--;
}
this.m_ShowVisibleForConnections[num] = EditorGUILayout.Foldout(this.m_ShowVisibleForConnections[num], "Visible Objects");
if (this.m_ShowVisibleForConnections[num])
{
EditorGUI.indentLevel++;
foreach (NetworkIdentity identity in connection.visList)
{
EditorGUILayout.ObjectField("NetId: " + identity.netId, identity, typeof(NetworkIdentity), true, new GUILayoutOption[0]);
}
EditorGUI.indentLevel--;
}
if (connection.clientOwnedObjects != null)
{
this.m_ShowOwnedForConnections[num] = EditorGUILayout.Foldout(this.m_ShowOwnedForConnections[num], "Owned Objects");
if (this.m_ShowOwnedForConnections[num])
{
EditorGUI.indentLevel++;
foreach (NetworkInstanceId id in connection.clientOwnedObjects)
{
GameObject obj2 = NetworkServer.FindLocalObject(id);
EditorGUILayout.ObjectField("Owned: " + id, obj2, typeof(NetworkIdentity), true, new GUILayoutOption[0]);
}
EditorGUI.indentLevel--;
}
}
EditorGUI.indentLevel--;
}
num++;
}
}
EditorGUI.indentLevel--;
}
}