diff --git a/assets/core/Root.ts b/assets/core/Root.ts index 0b9449d..231ea90 100644 --- a/assets/core/Root.ts +++ b/assets/core/Root.ts @@ -69,7 +69,7 @@ export class Root extends Component { // 设置默认资源包 oops.res.defaultBundleName = oops.config.game.bundleDefault; - oops.res.init(oops.config.game.bundlePackages); + oops.res.init(oops.config.game.data.bundle); // 本地存储模块 oops.storage = new StorageManager(); diff --git a/assets/core/common/loader/ResLoader.ts b/assets/core/common/loader/ResLoader.ts index 9a1f1c3..0ce681c 100644 --- a/assets/core/common/loader/ResLoader.ts +++ b/assets/core/common/loader/ResLoader.ts @@ -1,5 +1,4 @@ import { Asset, AssetManager, __private, assetManager, error, js, resources, warn } from "cc"; -import { oops } from "../../Oops"; export type AssetType = __private.__types_globals__Constructor | null; export type Paths = string | string[]; @@ -480,7 +479,7 @@ oops.res.loadDir("game", onProgressCallback, onCompleteCallback); } // 自动加载资源包 else { - const v = oops.config.game.bundleEnable ? this.bundles.get(args.bundle) : ""; + const v = this.cdn ? this.bundles.get(args.bundle) : ""; bundle = await this.loadBundle(args.bundle, v); if (bundle) this.loadByBundleAndArgs(bundle, args); }