修复GameComponent资源加载其它bundle中的资源使用后,组件释放时,未自动释放资源内存

This commit is contained in:
dgflash
2024-06-29 19:42:34 +08:00
parent 08a549bcc0
commit bf9c7101c7

View File

@@ -136,7 +136,7 @@ export class GameComponent extends Component {
if (paths instanceof Array) {
paths.forEach(path => {
this.resPaths.set(path, oops.res.defaultBundleName);
this.resPaths.set(path, bundleName);
});
}
else {
@@ -165,7 +165,7 @@ export class GameComponent extends Component {
if (paths instanceof Array) {
paths.forEach(path => {
this.resPaths.set(path, oops.res.defaultBundleName);
this.resPaths.set(path, bundleName);
});
}
else {
@@ -193,7 +193,7 @@ export class GameComponent extends Component {
if (this.resPathsDir == null) this.resPathsDir = new Map();
if (typeof dir === "string") {
this.resPathsDir.set(dir, oops.res.defaultBundleName);
this.resPathsDir.set(dir, bundleName);
}
else {
this.resPathsDir.set(bundleName, oops.res.defaultBundleName);