diff --git a/cocos/scene-graph/node.jsb.ts b/cocos/scene-graph/node.jsb.ts index 8fd82f1dd5e..4b99c37f42b 100644 --- a/cocos/scene-graph/node.jsb.ts +++ b/cocos/scene-graph/node.jsb.ts @@ -1171,6 +1171,14 @@ Object.defineProperty(nodeProto, 'scene', { } }); +Object.defineProperty(nodeProto, 'id', { + configurable: true, + enumerable: true, + set(id) { + this._id = id; + } +}); + nodeProto.rotate = function (rot: Quat, ns?: NodeSpace): void { _tempFloatArray[1] = rot.x; _tempFloatArray[2] = rot.y;