From 3b16e8386c0210f6f620d43a9de6de32a6c20189 Mon Sep 17 00:00:00 2001 From: hatayama Date: Thu, 9 Jul 2026 08:42:11 +0900 Subject: [PATCH] Remove unreachable mouse UI bypass validation All representable mouse UI actions support bypass targeting, while unknown actions are rejected before validation, so the defensive branch had no caller. --- .../SimulateMouseUi/MouseUiSimulationValidator.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationValidator.cs b/Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationValidator.cs index 0a0b3db02d..e3d85abcec 100644 --- a/Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationValidator.cs +++ b/Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiSimulationValidator.cs @@ -60,11 +60,6 @@ internal static class MouseUiSimulationValidator $"Drag actions only support Left button (uGUI ignores non-left drags), got: {parameters.Button}"); } - if (parameters.BypassRaycast && !SupportsBypassRaycast(parameters.Action)) - { - return MouseUiSimulationResponseFactory.CreateFailure(parameters, "BypassRaycast is not supported for this action."); - } - if (parameters.BypassRaycast && RequiresBypassTargetPath(parameters.Action) && string.IsNullOrWhiteSpace(parameters.TargetPath)) @@ -89,13 +84,6 @@ private static bool RequiresIdlePointer(MouseAction action) return action == MouseAction.Click || action == MouseAction.Drag || action == MouseAction.LongPress; } - private static bool SupportsBypassRaycast(MouseAction action) - { - return action == MouseAction.Click - || action == MouseAction.LongPress - || IsDragAction(action); - } - private static bool RequiresBypassTargetPath(MouseAction action) { return action == MouseAction.Click