From c19ac158f9a217413a3cdce02f94657047e97ba8 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:04:01 +0800 Subject: [PATCH] fixed --- Runtime/UXComponent/UX/UXHotkey.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/UXComponent/UX/UXHotkey.cs b/Runtime/UXComponent/UX/UXHotkey.cs index 94d0238..443e1a7 100644 --- a/Runtime/UXComponent/UX/UXHotkey.cs +++ b/Runtime/UXComponent/UX/UXHotkey.cs @@ -115,6 +115,8 @@ internal static class UXHotkeyComponent if (registrations[i].button == button) { hotkeyInfo = registrations[i]; + registrations.RemoveAt(i); + _hotkeyRegistry.Remove(actionId); if (_sharedHandlers.TryGetValue(actionId, out var handlerInfo)) { var (handler, pressType) = handlerInfo; @@ -141,8 +143,6 @@ internal static class UXHotkeyComponent _sharedHandlers.Remove(actionId); } - registrations.RemoveAt(i); - _hotkeyRegistry.Remove(actionId); break; } }