修复ResLoader对象的交叉引用警告

This commit is contained in:
dgflash
2024-10-05 17:37:38 +08:00
parent effccc0639
commit 968024d85c
2 changed files with 2 additions and 3 deletions

View File

@@ -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();

View File

@@ -1,5 +1,4 @@
import { Asset, AssetManager, __private, assetManager, error, js, resources, warn } from "cc";
import { oops } from "../../Oops";
export type AssetType<T = Asset> = __private.__types_globals__Constructor<T> | 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);
}