public static void CheckMatchClientVersion(InitConfigDelegate pCallBack) { bool ok = true; string msg = _ClientVersion.GetVersion(); STVersion ConfigVersion = GetCurrentConfigVersion(); if (ConfigVersion.Major != _ClientVersion.Major || ConfigVersion.Minor != _ClientVersion.Minor) { // need to show the force patch popup msg = "You have to patch the newest version( " + ConfigVersion.GetVersion() + " ) of the game client. (" + _ClientVersion.GetVersion() + ")"; ok = false; } else if (ConfigVersion.Revision != _ClientVersion.Revision) { // need to show the recommend popup msg = "The newest version( " + ConfigVersion.GetVersion() + " ) of the game client(" + _ClientVersion.GetVersion() + ") is available."; ok = false; } if (pCallBack != null) { pCallBack(ok, msg); } }
public static IEnumerator WWWLoadConfigFile(InitConfigDelegate pCallback) { WWW www = new WWW(GetConfigURL()); yield return(www); #if UNITY_EDITOR Debug.Log("Config Json : " + www.text); #endif if (string.IsNullOrEmpty(www.error)) { _ConfigInfo = xLitJson.JsonMapper.ToObject <STConfig>(www.text); if (pCallback != null) { pCallback(true, "<color=#00ff00>Successfully! WWW Load Config File URL : " + GetConfigURL() + "</color>"); } } else { if (pCallback != null) { pCallback(false, "<color=#ff0000>Faild! WWW Load Config File URL : " + GetConfigURL() + "</color>"); } } }