mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-09-03 04:03:46 +08:00
修复界面释放时未传bundle名的问题
This commit is contained in:
@@ -364,7 +364,9 @@ oops.res.loadDir("game", onProgressCallback, onCompleteCallback);
|
||||
* @param path 资源路径
|
||||
* @param bundleName 远程资源包名
|
||||
*/
|
||||
release(path: string, bundleName: string = this.defaultBundleName) {
|
||||
release(path: string, bundleName?: string) {
|
||||
if (bundleName == undefined) bundleName = this.defaultBundleName;
|
||||
|
||||
const bundle = assetManager.getBundle(bundleName);
|
||||
if (bundle) {
|
||||
const asset = bundle.get(path);
|
||||
|
||||
@@ -85,7 +85,7 @@ export class DelegateComponent extends Component {
|
||||
this.node.destroy();
|
||||
|
||||
// 释放界面相关资源
|
||||
oops.res.release(vp.config.prefab);
|
||||
oops.res.release(vp.config.prefab, vp.config.bundle);
|
||||
|
||||
// oops.log.logView(`【界面管理】释放【${vp.config.prefab}】界面资源`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user