private static IEnumerator <WWW> CheckWebUpdate(WWW www) { yield return(www); try { Hashtable returnParam = (Hashtable)GA_MiniJSON.JsonDecode(www.text); string newVersion = ((Hashtable)returnParam["unity"])["version"].ToString(); GA_UpdateWindow.SetNewVersion(newVersion); if (newVersion != GA_Settings.VERSION) { GetUpdateChanges(); } } catch {} }
private static IEnumerator<WWW> CheckWebUpdate (WWW www) { yield return www; try { if (string.IsNullOrEmpty(www.error)) { Hashtable returnParam = (Hashtable)GA_MiniJSON.JsonDecode(www.text); string newVersion = ((Hashtable)returnParam["unity"])["version"].ToString(); GA_UpdateWindow.SetNewVersion(newVersion); int newV = int.Parse(newVersion.Replace(".","")); int oldV = int.Parse(GA_Settings.VERSION.Replace(".","")); if (newV > oldV) { GetUpdateChanges(); } } } catch {} }