In the browser, I executed the following code to delete a node.
this.node.destroy();”
Then the message “The asset has been destroyed!” appears in the console.
Every time I delete a node, I get 3 or 4 of these messages.
I created a project that only does this.node.destroy();” in each of Cocos ‘3.8.2’ and ‘3.8.3’, but it still happens.
Also, the description in the documentation that the node does not delete itself, but rather deletes itself from other nodes, did not work.
This is not an error, but it looks very bad and is definitely not something you want to display.
Do you know what causes this to appear or what can be done about it?
https://docs.cocos.com/creator/3.8/manual/en/scripting/life-cycle-callbacks.html,For every component in Cocos, has its life-cycle. Of course you should know clearly the node, when it will be created, and when it will be destroyed. Please make sure every time you call this.node.destroy, the node is valid. Just in case, it is better for you to add isValid() to judge whether the node is valid.