Commit 296dac9d authored by limingzhe's avatar limingzhe

fix: debug

parent 9d4d0c88
...@@ -416,7 +416,7 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -416,7 +416,7 @@ export abstract class middleLayerBase extends cc.Component {
clearDragonDisplayAssetList2() { async clearDragonDisplayAssetList() {
console.log('喵喵喵: clearDragonDisplayAssetList'); console.log('喵喵喵: clearDragonDisplayAssetList');
console.log('喵喵喵: ' + this.nodeList.length); console.log('喵喵喵: ' + this.nodeList.length);
...@@ -456,25 +456,41 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -456,25 +456,41 @@ export abstract class middleLayerBase extends cc.Component {
// // asset.destroy(); // // asset.destroy();
// }); // });
const setParentVisible = (n) => {
n.active = true;
if (n.parent) {
setParentVisible(n.parent);
}
}
this.nodeList.forEach(node => {
setParentVisible(node);
// node.active = false;
// node.removeFromParent();
});
await asyncDelay(0.001);
[ ...this.atlasList, ...this.assetList ].forEach(asset => { [ ...this.atlasList, ...this.assetList ].forEach(asset => {
console.log('asset_uuid: ', asset._uuid); console.log('asset_uuid: ', asset._uuid);
console.log('asset: ', asset); console.log('asset: ', asset);
// asset.decRef(); // asset.decRef();
cc.assetManager.releaseAsset(asset);
asset.destroy();
while (asset?.refCount > 0) { while (asset?.refCount > 0) {
asset.decRef(); asset.decRef();
} }
}); cc.assetManager.releaseAsset(asset);
asset.destroy();
this.nodeList.forEach(node => {
node.active = false;
node.removeFromParent();
}); });
this.textureList.forEach(texture => { this.textureList.forEach(texture => {
// console.log('texture_uuid: ', texture._uuid); // console.log('texture_uuid: ', texture._uuid);
// console.log('texture: ', texture); // console.log('texture: ', texture);
...@@ -488,15 +504,15 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -488,15 +504,15 @@ export abstract class middleLayerBase extends cc.Component {
}); });
cc.assetManager.releaseUnusedAssets(); await asyncDelay(0.001);
cc.assetManager.releaseUnusedAssets();
} }
clearDragonDisplayAssetList() { clearDragonDisplayAssetList2() {
console.log('喵喵喵: clearDragonDisplayAssetList'); console.log('喵喵喵: clearDragonDisplayAssetList');
......
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