this.node.isValid之前必须要判断this.node是否为null吧?

直接使用this.node.isValid,如果此时this.node已经为null的情况下,程序就崩了,看来保险起见应该这样做吧?
if (!this.node){
if (this.node.isValid){
console.log(“node test”)
}
}

cc.isValid(this.node)不香么?

this.node?.isValid

是的,看来cc.isValid(this.node)这写法最正规,因为看到网上有例子,用的是this.node.isValid,没多想就拿来用了,结果崩了。。。。