Commit eaaaff71 authored by 范雪寒's avatar 范雪寒

feat:

parent d1840af5
...@@ -1181,12 +1181,15 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1181,12 +1181,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log(' in onDestroy'); console.log(' in onDestroy');
this.releaseAssets(); this.releaseAssets();
const armatureDisplay = this.canvas.animaNode.getComponent(dragonBones.ArmatureDisplay); this.animaNode.removeFromParent();
this.canvas.animaNode.removeFromParent();
setTimeout(() => { setTimeout(() => {
armatureDisplay.dragonAtlasAsset.texture.destroy(); if (this.dragonDisplay) {
armatureDisplay.dragonAtlasAsset.destroy(); this.dragonDisplay.dragonAtlasAsset.texture.destroy();
armatureDisplay.dragonAsset.destroy(); this.dragonDisplay.dragonAtlasAsset.destroy();
this.dragonDisplay.dragonAsset.destroy();
} else {
console.log('没有 this.dragonDisplay');
}
}, 100); }, 100);
} }
} }
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