From a7801cccd1ef526dbe0130a6002d996230691964 Mon Sep 17 00:00:00 2001 From: xu_yanfeng Date: Thu, 6 Feb 2025 15:48:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=8B=BE=E5=8F=96Canvas?= =?UTF-8?q?=EF=BC=8C=E5=BD=B1=E5=93=8D=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/inject/hint/hint-v3.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scripts/inject/hint/hint-v3.ts b/src/scripts/inject/hint/hint-v3.ts index ce0d45a..d844707 100644 --- a/src/scripts/inject/hint/hint-v3.ts +++ b/src/scripts/inject/hint/hint-v3.ts @@ -11,8 +11,15 @@ export class HintV3 extends HintAdapter { return cc.UITransformComponent || cc.UITransform; } hitTest(node: any, x: number, y: number): boolean { + if (node === this.inspectorCanvas) { + return false; + } + if (node.getComponent(cc.Canvas)) { + // 因为Canvas会全屏,所以暂时不拾取,会干扰体验 + return false; + } + let hitTest = null; - // hitTest = node._uiProps?.uiTransformComp?.hitTest; const tr = node.getComponent(this.transformComponent); if (tr) { if (tr.hitTest) {