Commit 6d9771a9 authored by 李维's avatar 李维

添加日志

parent dc9a6a1b
......@@ -498,10 +498,16 @@ export abstract class middleLayerBase extends cc.Component {
// 释放bundle
releaseBundle() {
this.log(`准备释放 Bundle: ${this.oldSceneName};`)
// 释放bundle
const bd = cc.assetManager.getBundle(this.oldSceneName);
if(bd) {
bd.releaseAll();
cc.assetManager.removeBundle(bd);
this.log(`释放 Bundle: ${this.oldSceneName} 完毕.`)
} else {
this.log(`没有找到 Bundle: ${this.oldSceneName};`)
}
}
// 释放资源和Bundle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment