/// <summary> /// 获得正在的输出路径 /// </summary> /// <returns></returns> string GetTrueOutPath() { BundlePackConfig m_PackConfig = Util.FileUtil.ReadFromBinary <BundlePackConfig>(BundlePackUtil.GetPackConfigPath()); options = m_PackConfig.GetBundleOptions(); buildTarget = m_PackConfig.GetBuildTarget(); string outputTargetDir = m_PackConfig.OutputDirPath + "/" + buildTarget.ToString() + "/" + AssetBundleConst.ASSETBUNDLE_MAINFEST_NAME; if (!Directory.Exists(outputTargetDir)) { Debug.LogError("eternity_assetbunles/StandaloneWindows64/assetbundles -------> AB 存放路径不存在"); return(string.Empty); } return(outputTargetDir); }
/// <summary> /// 根据配置打包AB /// </summary> /// <param name="packConfig"></param> /// <returns></returns> public static AssetBundleManifest PackAssetBundle(BundlePackConfig packConfig) { return(PackAssetBundle(packConfig.OutputDirPath, packConfig.CleanupBeforeBuild, packConfig.GetBundleOptions(), packConfig.GetBuildTarget())); }