diff --git a/cocos/scene-graph/node.js b/cocos/scene-graph/node.js index 5d506771bd..4f1f26ce94 100644 --- a/cocos/scene-graph/node.js +++ b/cocos/scene-graph/node.js @@ -34,6 +34,11 @@ export default class Node extends BaseNode { @property _hasChanged = false; // has the transform changed in this frame? + // is node but not scene + static isNode (obj) { + return obj instanceof Node && (obj.constructor === Node || !(obj instanceof cc.Scene)); + } + constructor (name) { super(name); EventTarget.call(this);