From 3cfc9d136a7b3bcf4d3d2eb5302602b5b617046d 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: Tue, 8 Apr 2025 12:28:18 +0900 Subject: [PATCH] =?UTF-8?q?RF=20=EC=B8=B5=20=EB=B2=84=ED=8A=BC=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EB=B0=8F=20UI=20=EB=93=9C=EB=9E=98=EA=B7=B8=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GenericController/GenericController.cs | 58 +++------ .../Panel/Panel_CompleteAlramHistory.prefab | 2 +- Assets/Prefabs/UI/Panel/Panel_Library.prefab | 2 +- Assets/Prefabs/UI/Panel/Panel_Menu.prefab | 16 +-- .../UI/PRF_Panel_MachineDashBoard.prefab | 4 +- Assets/Scenes/Main.unity | 2 +- Assets/Scripts/UI/UI_FloorButton.cs | 10 +- .../WorkSpace/Personal/JYM/Panel_ToolBar.cs | 1 + .../Personal/JYM/UI_ProtocolSetting.cs | 2 + CompleteTimeAlarmInfo.json | 122 +++++++++--------- 10 files changed, 107 insertions(+), 112 deletions(-) diff --git a/Assets/Plugins/XRLib/GenericController/GenericController.cs b/Assets/Plugins/XRLib/GenericController/GenericController.cs index 9fa2a7e8..af87a0b8 100644 --- a/Assets/Plugins/XRLib/GenericController/GenericController.cs +++ b/Assets/Plugins/XRLib/GenericController/GenericController.cs @@ -59,51 +59,35 @@ namespace WI return result; } } - //UI위에 마우스 있는경우 - public bool IsOnTheUI - { - get - { - if (IsPointerOverExcludedUI()) - { - return false; - } - else - { - var result = EventSystem.current.IsPointerOverGameObject(); - return result; - } - } - } - bool IsPointerOverExcludedUI() - { - PointerEventData pointerData = new PointerEventData(EventSystem.current); - pointerData.position = Input.mousePosition; - - List raycastResults = new List(); - EventSystem.current.RaycastAll(pointerData, raycastResults); - - foreach(var raycastResult in raycastResults) - { - if ((LayerMask.GetMask("Default") & (1 << raycastResult.gameObject.layer)) != 0) - { - return true; - } - } - - return false; - } - + bool isPressed; protected virtual void LateUpdate() { + if (IsPressedUI()) + return; + if (IsClickUI) return; - if (IsOnTheUI) - return; + input.GetInput(); Movement(); var limitCheck = maxRangeLimitter.MoveRangeLimit(nextPosition); LastPositioning(limitCheck); } + private bool IsPressedUI() + { + if (Input.GetMouseButtonDown(0)) + { + if (EventSystem.current.IsPointerOverGameObject()) + { + isPressed = true; + } + } + + if (Input.GetMouseButtonUp(0)) + { + isPressed = false; + } + return isPressed; + } } } \ No newline at end of file diff --git a/Assets/Prefabs/UI/Panel/Panel_CompleteAlramHistory.prefab b/Assets/Prefabs/UI/Panel/Panel_CompleteAlramHistory.prefab index 031924da..cd3d654b 100644 --- a/Assets/Prefabs/UI/Panel/Panel_CompleteAlramHistory.prefab +++ b/Assets/Prefabs/UI/Panel/Panel_CompleteAlramHistory.prefab @@ -295,7 +295,7 @@ MonoBehaviour: m_Content: {fileID: 8100983100533929295} m_Horizontal: 0 m_Vertical: 1 - m_MovementType: 1 + m_MovementType: 2 m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 diff --git a/Assets/Prefabs/UI/Panel/Panel_Library.prefab b/Assets/Prefabs/UI/Panel/Panel_Library.prefab index 9be96bbf..a8fe6ab1 100644 --- a/Assets/Prefabs/UI/Panel/Panel_Library.prefab +++ b/Assets/Prefabs/UI/Panel/Panel_Library.prefab @@ -694,7 +694,7 @@ MonoBehaviour: m_Content: {fileID: 1664826789211949129} m_Horizontal: 1 m_Vertical: 0 - m_MovementType: 1 + m_MovementType: 2 m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 diff --git a/Assets/Prefabs/UI/Panel/Panel_Menu.prefab b/Assets/Prefabs/UI/Panel/Panel_Menu.prefab index 193bd9f3..15b04f35 100644 --- a/Assets/Prefabs/UI/Panel/Panel_Menu.prefab +++ b/Assets/Prefabs/UI/Panel/Panel_Menu.prefab @@ -343,7 +343,7 @@ MonoBehaviour: m_Content: {fileID: 8638979772171968288} m_Horizontal: 0 m_Vertical: 1 - m_MovementType: 1 + m_MovementType: 2 m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 @@ -2320,9 +2320,9 @@ RectTransform: - {fileID: 3587059684787867451} m_Father: {fileID: 1904382343685541487} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 215.255, y: -347.375} m_SizeDelta: {x: 340.51, y: 151.97} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1617684694942205957 @@ -11292,7 +11292,7 @@ MonoBehaviour: m_Content: {fileID: 1904382343685541487} m_Horizontal: 0 m_Vertical: 1 - m_MovementType: 1 + m_MovementType: 2 m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 @@ -15279,9 +15279,9 @@ RectTransform: - {fileID: 1581751372906333712} m_Father: {fileID: 1904382343685541487} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 215.25002, y: -120.69499} m_SizeDelta: {x: 340.50003, y: 241.38998} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &8103516073146861605 diff --git a/Assets/Resources/Prefabs/UI/PRF_Panel_MachineDashBoard.prefab b/Assets/Resources/Prefabs/UI/PRF_Panel_MachineDashBoard.prefab index 39a0627f..3682eac3 100644 --- a/Assets/Resources/Prefabs/UI/PRF_Panel_MachineDashBoard.prefab +++ b/Assets/Resources/Prefabs/UI/PRF_Panel_MachineDashBoard.prefab @@ -592,7 +592,7 @@ MonoBehaviour: m_Content: {fileID: 3065632315239046984} m_Horizontal: 0 m_Vertical: 1 - m_MovementType: 1 + m_MovementType: 2 m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 @@ -1410,7 +1410,7 @@ MonoBehaviour: m_Content: {fileID: 3522885334464503914} m_Horizontal: 0 m_Vertical: 1 - m_MovementType: 1 + m_MovementType: 2 m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 3768d1b8..b2455ef8 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -435731,7 +435731,7 @@ PrefabInstance: - target: {fileID: 6053503471138626323, guid: a74d4a3b763fd8d438c7fff5d89e9430, type: 3} propertyPath: m_AnchoredPosition.x - value: 10.3 + value: 0 objectReference: {fileID: 0} - target: {fileID: 6053503471138626323, guid: a74d4a3b763fd8d438c7fff5d89e9430, type: 3} diff --git a/Assets/Scripts/UI/UI_FloorButton.cs b/Assets/Scripts/UI/UI_FloorButton.cs index 6b618f1e..c90903fb 100644 --- a/Assets/Scripts/UI/UI_FloorButton.cs +++ b/Assets/Scripts/UI/UI_FloorButton.cs @@ -23,7 +23,15 @@ public class UI_FloorButton : UIBase button = GetComponent