void AuthList() { if (Foldout.Check("auth list")) { foreach (var ac in script.mAuthingConnections) { EditorGUILayout.LabelField(string.Format("{0} > {1}", ac.timer, ac.connection.RemoteEndPoint)); } } }
void PlayerList() { constantUpdate = false; if (Foldout.Check("player list")) { ++EditorGUI.indentLevel; foreach (var player in script.players) { if (Foldout.Check(player.playerName)) { StringBuilder text = new StringBuilder(); text.AppendFormat("id: {0}\n", player.id) .AppendFormat("state: {0}\n", player.state) .AppendFormat("choke: {0}\n", player.choke) .Append("ackInput: " + string.Join(",", Array.ConvertAll(player.mAckInputs, v => v.ToString()))); EditorGUILayout.LabelField(text.ToString(), EditorStyles.textArea, GUILayout.Width(300f)); constantUpdate = true; } } --EditorGUI.indentLevel; } }