From 69831116ab6463fb2bcb5c6d80edf9584d73057d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=98=81=EB=AF=BC?= <117150306+jym04@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:12:34 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=88=EC=9A=B0=EC=8A=A4=20=EC=9A=B0?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20=EC=83=81=ED=83=9C=EC=9D=BC=20=EC=8B=9C=20?= =?UTF-8?q?Gizmo=20=EB=B3=80=EA=B2=BD=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Studio/AssetTool/RenderObjectHandler.cs | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs b/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs index 91110d15..0be4570f 100644 --- a/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs +++ b/Assets/Scripts/Studio/AssetTool/RenderObjectHandler.cs @@ -29,6 +29,7 @@ namespace Studio.AssetTool int uiLayer; int selectIndex; bool lockHandler = false; + bool inputLockhandler = false; public override void Init() { @@ -413,10 +414,12 @@ namespace Studio.AssetTool downKeyActions.Add(KeyCode.Mouse0, OnMousePointerDown); upKeyActions.Add(KeyCode.Mouse0, OnMousePointerUp); - downKeyActions.Add(KeyCode.Q, () => CommandInvoker.instance.Invoke(new ActivateMoveGizmoCommand())); - downKeyActions.Add(KeyCode.W, () => CommandInvoker.instance.Invoke(new ActivateRotateGizmoCommand())); - downKeyActions.Add(KeyCode.E, () => CommandInvoker.instance.Invoke(new ActivateScaleGizmoCommand())); - downKeyActions.Add(KeyCode.R, () => CommandInvoker.instance.Invoke(new ResetGizmoCommand())); + downKeyActions.Add(KeyCode.Mouse1, OnMouseRightPointerDown); + upKeyActions.Add(KeyCode.Mouse1, OnMouseRightPointerUp); + downKeyActions.Add(KeyCode.Q, () => SetGizmoChangedCommand(new ActivateMoveGizmoCommand())); + downKeyActions.Add(KeyCode.W, () => SetGizmoChangedCommand(new ActivateRotateGizmoCommand())); + downKeyActions.Add(KeyCode.E, () => SetGizmoChangedCommand(new ActivateScaleGizmoCommand())); + downKeyActions.Add(KeyCode.R, () => SetGizmoChangedCommand(new ResetGizmoCommand())); downKeyActions.Add(KeyCode.Delete, () => CommandInvoker.instance.Invoke(new RemoveSelectObjectCommand())); getKeyActions.Add(KeyCode.V, VertexSnap); @@ -436,5 +439,20 @@ namespace Studio.AssetTool var handler = new InputHandler(getKeyActions, downKeyActions, upKeyActions, shortcutTable); return handler; } + private void OnMouseRightPointerDown() + { + inputLockhandler = true; + } + private void OnMouseRightPointerUp() + { + inputLockhandler = false; + } + private void SetGizmoChangedCommand(IIrreversibleCommand command) + { + if (!inputLockhandler) + { + CommandInvoker.instance.Invoke(command); + } + } } } -- 2.48.1.windows.1