/// <summary> /// 读取当前本地客户端版本 /// </summary> private void ReadLocalCurentVersionData() { //记录客户端版本号 var newestVersion = PlayerPrefs.GetString(VersionDefine.PrefKey_LocalVersion); var versionData = PlayerPrefs.GetString(newestVersion); //记录客户端版本资源结构 localConfig = ResourcesConfig.Create(versionData); }
/// <summary> /// 读取服务器版本信息 /// </summary> /// <returns></returns> private IEnumerator ReadServeNewestVersion() { string versionMessage = null; yield return(FetchMessageFromWeb(pather.WebServeVersionPath, output => versionMessage = output)); if (!string.IsNullOrEmpty(versionMessage)) { //记录当前服务器版本号 currentServeVersion = versionMessage; var serveConfigURL = pather.GetServeConfigPath(versionMessage); //Debug.Log(NewestServeConfigURL); string serverData = null; yield return(FetchMessageFromWeb(serveConfigURL, output => serverData = output)); //Debug.Log(servedata); //记录当前服务器资源结构 serveConfig = ResourcesConfig.Create(serverData); } }