From e95b661d6a71b34677b94dd0568bb4842c1c9b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Wed, 3 Sep 2025 13:43:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/UXComponent/UX/UXHotkey.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Runtime/UXComponent/UX/UXHotkey.cs b/Runtime/UXComponent/UX/UXHotkey.cs index 7ed6598..28911e8 100644 --- a/Runtime/UXComponent/UX/UXHotkey.cs +++ b/Runtime/UXComponent/UX/UXHotkey.cs @@ -163,12 +163,11 @@ public static class UXButtonHotkeyExtension button._hotkeyPressType ); } - } public static void UnBindHotKey(this UXButton button) { - if (button == null) return; + if (button == null || button._hotKeyRefrence == null) return; UXHotkeyComponent.UnregisterHotkey(button); } }