public void UpdateFlagsText(GameVariables variables) { string newText = ""; foreach (string str in variables.GetFlags()) { newText += str + "\n"; } foreach (KeyValuePair <string, string> kvp in variables.GetVariables()) { newText += kvp.Key + ": " + kvp.Value + "\n"; } foreach (KeyValuePair <string, int> kvp in variables.GetCounters()) { newText += kvp.Key + ": " + kvp.Value + "\n"; } flagsText.text = newText; }