From 4953a461180cba345dd4b7ac9216c9a559586831 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Thu, 13 Apr 2023 15:37:46 +0800 Subject: [PATCH] Update UIExtension.cs --- Assets/GameScripts/HotFix/GameLogic/UI/Common/UIExtension.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/GameScripts/HotFix/GameLogic/UI/Common/UIExtension.cs b/Assets/GameScripts/HotFix/GameLogic/UI/Common/UIExtension.cs index a6de80bc..18065b6b 100644 --- a/Assets/GameScripts/HotFix/GameLogic/UI/Common/UIExtension.cs +++ b/Assets/GameScripts/HotFix/GameLogic/UI/Common/UIExtension.cs @@ -94,7 +94,7 @@ public static class UIExtension public static bool GetMouseDownUiPos(this UIModule uiModule, out Vector3 screenPos) { bool hadMouseDown = false; - Vector3 mousePos = Vector3.zero; + Vector3 mousePos; #if UNITY_EDITOR || PLATFORM_STANDALONE_WIN mousePos = Input.mousePosition; @@ -113,7 +113,7 @@ public static class UIExtension RectTransformUtility.ScreenPointToLocalPointInRectangle( uiModule.UIRoot as RectTransform, - Input.mousePosition, + mousePos, uiModule.UICamera, out var pos); screenPos = uiModule.UIRoot.TransformPoint(pos);