From fc6beb0869491204c11f553be5d95211c5d4d0e4 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 14 Sep 2022 19:37:13 +0800 Subject: [PATCH] fixed #12772: Node.pause/resumeSystemEvent not working on native platform. --- cocos/core/scene-graph/node.jsb.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cocos/core/scene-graph/node.jsb.ts b/cocos/core/scene-graph/node.jsb.ts index 29fdeffdce6..a09e80863a5 100644 --- a/cocos/core/scene-graph/node.jsb.ts +++ b/cocos/core/scene-graph/node.jsb.ts @@ -324,6 +324,14 @@ nodeProto.targetOff = function (target: string | unknown) { } }; +nodeProto.pauseSystemEvents = function pauseSystemEvents (recursive: boolean): void { + this._eventProcessor.setEnabled(false, recursive); +}; + +nodeProto.resumeSystemEvents = function resumeSystemEvents (recursive: boolean): void { + this._eventProcessor.setEnabled(true, recursive); +}; + nodeProto._removeComponent = function (component: Component) { if (!component) { errorID(3814);