//DrawDictionary возвращает true в том случае если контент в одном из полей был поменян bool DrawDictionary(SSDictionary pDictionary) { bool changed = false; if (pDictionary != null) { string[] keys = new string[pDictionary.Count]; string[] newValues = new string[pDictionary.Count]; int iIndex = 0; foreach (KeyValuePair <string, string> pair in pDictionary) { keys[iIndex] = pair.Key; newValues[iIndex] = EditorGUILayout.DelayedTextField(pair.Key, pair.Value); ++iIndex; } for (int iX = 0; iX < keys.Length; ++iX) { if (pDictionary[keys[iX]] != newValues[iX]) { changed = true; } pDictionary[keys[iX]] = newValues[iX]; } } return(changed); }
public void _OnIncomingOrder(string pResponse) { SSDictionary response = JsonConvert.DeserializeObject <SSDictionary>(pResponse); if (response.ContainsKey("order")) { if (response["order"] == "quit") { QuitOrder?.Invoke(); } } }