public void ListSkyCulture() { Dictionary <string, string> parameters = new Dictionary <string, string>(); Stellarium.GET(Path, "listskyculture", parameters, (result, error) => { if (error != null) { Debug.LogError(string.Format("[{0}] {1}", Identifier, error)); return; } SkyCultureList skyCultureList = new SkyCultureList(); skyCultureList.skyCultures = new SkyCulture(); foreach (KeyValuePair <string, string> skyCulture in (new JSONObject(result).ToDictionary())) { skyCultureList.skyCultures.Add(skyCulture.Key, skyCulture.Value); } if (OnGotSkyCultureList != null) { OnGotSkyCultureList(skyCultureList); } }); }
private void ViewService_OnGotSkyCultureList(SkyCultureList result) { Debug.Log(result.skyCultures.Count); }