From d840d922251c76f504fc1ef10c9c8c532e664c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Mon, 11 Aug 2025 16:19:19 +0800 Subject: [PATCH] fix --- Runtime/UXComponent/UX/UXHotkey.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/UXComponent/UX/UXHotkey.cs b/Runtime/UXComponent/UX/UXHotkey.cs index 111f85d..330335b 100644 --- a/Runtime/UXComponent/UX/UXHotkey.cs +++ b/Runtime/UXComponent/UX/UXHotkey.cs @@ -116,7 +116,7 @@ internal static class UXHotkeyComponent { hotkeyInfo = registrations[i]; registrations.RemoveAt(i); - _hotkeyRegistry.Remove(actionId); + if (_sharedHandlers.TryGetValue(actionId, out var handlerInfo)) { var (handler, pressType) = handlerInfo; @@ -128,6 +128,7 @@ internal static class UXHotkeyComponent { actionRef.action.Disable(); _sharedHandlers.Remove(actionId); + _hotkeyRegistry.Remove(actionId); } switch (pressType)