private void OnComplete() { if (enableVFS) { var dataPath = _savePath + Versions.Dataname; var downloads = _downloader.downloads; if (downloads.Count > 0 && File.Exists(dataPath)) { OnMessage("更新本地版本信息"); var files = new List <VFile>(downloads.Count); foreach (var download in downloads) { files.Add(new VFile { name = download.name, hash = download.hash, len = download.len, }); } var file = files[0]; if (!file.name.Equals(Versions.Dataname)) { Versions.UpdateDisk(dataPath, files); } } Versions.LoadDisk(dataPath); } OnProgress(1); OnMessage("更新完成"); var version = Versions.LoadVersion(_savePath + Versions.Filename); if (version > 0) { OnVersion(version.ToString()); } //StartCoroutine(LoadGameScene()); FrameworkBoot.Event.Fire(StartBootResSystemEventArgs.EventId, StartBootResSystemEventArgs.Create(1)); }
public void StartUpdate() { Debug.Log("StartUpdate.Development:" + development); #if UNITY_EDITOR if (development) { Assets.runtimeMode = false; //StartCoroutine(LoadGameScene()); FrameworkBoot.Event.Fire(StartBootResSystemEventArgs.EventId, StartBootResSystemEventArgs.Create(1)); return; } #endif OnStart(); if (_checking != null) { StopCoroutine(_checking); } _checking = Checking(); StartCoroutine(_checking); }