static bool BuildLiveUpdateAssets() { bool result = false; BuildTarget target = BuildAssetBundleHelper.GetBuildTarget(_liveUpdateConfig._platformType); if (target != BuildTarget.NoTarget) { //Note: Important fix. If don't switch platform, everytime before building AssetBundle, //it will take much time to switch to the particular platform. PerformBuild.SwitchBuildPlatform(target); string path = BuildAssetBundleHelper.GetAssetBundlePath(_liveUpdateConfig._platformType); BuildAssetBundleHelper.DeleteAllFilesInDir(path); ExcelDirType dirType = BuildAssetBundleHelper.GetExcelDirType(target); List <string> allResPaths = BuildAssetBundleHelper.GetAllExcelResourcePaths(dirType, _liveUpdateConfig._excelFileNames); allResPaths.AddRange(_liveUpdateConfig._resourcePaths); result = BuildAssetBundles.BuildBundlesFromMap(path, _liveUpdateConfig._version, _liveUpdateConfig._platformType, target, true, _liveUpdateConfig._bundleName, allResPaths); } return(result); }
static bool BuildABTestAssets() { bool result = false; BuildTarget target = BuildAssetBundleHelper.GetBuildTarget(_abTestConfig._platformType); if (target != BuildTarget.NoTarget) { //Note: Important fix. If don't switch platform, everytime before building AssetBundle, //it will take much time to switch to the particular platform. PerformBuild.SwitchBuildPlatform(target); ExcelDirType dirType = BuildAssetBundleHelper.GetExcelDirType(target); result = true; foreach (string abVersion in _abTestConfig._abVersions) { string path = BuildAssetBundleHelper.GetAssetBundlePath(_abTestConfig._platformType); BuildAssetBundleHelper.DeleteAllFilesInDir(path); BuildABTestHelper.CopyABToProject(abVersion, dirType); string version = _abTestConfig._version + "." + abVersion; List <string> allResPaths = BuildAssetBundleHelper.GetAllExcelResourcePaths(dirType, _abTestConfig._excelFileNames); allResPaths.AddRange(_abTestConfig._resourcePaths); bool r = BuildAssetBundles.BuildBundlesFromMap(path, version, _abTestConfig._platformType, target, true, _abTestConfig._bundleName, allResPaths); if (!r) { result = false; } } } return(result); }