static void Buildupdate() { GameObject wwwMange = new GameObject(); wwwMange.AddComponent <WWWManager>(); AssetBundleBuildConfig config = AssetBundleBuildPanel.LoadConfig(); AssetBundleBuilder.Build(config); VersionConfig newCfg = getNewVersion(); string url = getServerUrl().Combine(GameUpdater.CurrentVersionPath); string cachePath = GameUpdater.CacheVersionPath; Debug.LogError("加载服务端version信息……"); GameUpdater.Instance.DeleteCacheVersion(); WWWManager.Instance.DownloadWWW(url, cachePath, (suc) => { VersionConfig serverCfg = VersionUtil.ReadConfig(cachePath); List <string> files = GameUpdater.Instance.GetFileListNeedDownloaded(serverCfg, newCfg); Debug.LogError("需要更新的ab包个数:" + files.Count); FileUtil.DeleteFileOrDirectory(cachePath); copyToUpdate(files); GameObject.DestroyImmediate(wwwMange); Debug.LogError("外网更新打包结束!"); }); }
static void Open() { AssetBundleBuildPanel panel = GetWindow <AssetBundleBuildPanel>("ABSystem", true); }
public static void BuildBundle() { AssetBundleBuildPanel.Save(); AssetBundleBuildPanel.BuildAssetBundles(); }