//获得服务器版本 public void GetServerVersion() { m_InitView.SetTitle("获得服务器版本"); string url = GameConfig.GetResUrl("chinatown/version.txt"); ABLoader.Instance.LoadRes(url, (www) => { if (www.error != null) { InitFailed("获得服务器版本失败"); return; } m_ServerVersion = JsonUtility.FromJson <VersionJson>(www.text); CheckVersion(); }); }
//获得本地版本 public void GetLocalVersion() { m_InitView.SetTitle("获得本地版本"); string path = GameConfig.GetWWWReadPath("chinatown/version.txt"); ABLoader.Instance.LoadRes(path, (www) => { if (www.error != null) { InitFailed("获得本地版本失败"); return; } m_LocalVersion = JsonUtility.FromJson <VersionJson>(www.text); m_InitView.SetVersion(m_LocalVersion.Version); GetServerVersion(); }); }