mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update UIExtension.cs
This commit is contained in:
@@ -94,7 +94,7 @@ public static class UIExtension
|
|||||||
public static bool GetMouseDownUiPos(this UIModule uiModule, out Vector3 screenPos)
|
public static bool GetMouseDownUiPos(this UIModule uiModule, out Vector3 screenPos)
|
||||||
{
|
{
|
||||||
bool hadMouseDown = false;
|
bool hadMouseDown = false;
|
||||||
Vector3 mousePos = Vector3.zero;
|
Vector3 mousePos;
|
||||||
|
|
||||||
#if UNITY_EDITOR || PLATFORM_STANDALONE_WIN
|
#if UNITY_EDITOR || PLATFORM_STANDALONE_WIN
|
||||||
mousePos = Input.mousePosition;
|
mousePos = Input.mousePosition;
|
||||||
@@ -113,7 +113,7 @@ public static class UIExtension
|
|||||||
|
|
||||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
||||||
uiModule.UIRoot as RectTransform,
|
uiModule.UIRoot as RectTransform,
|
||||||
Input.mousePosition,
|
mousePos,
|
||||||
uiModule.UICamera, out var pos);
|
uiModule.UICamera, out var pos);
|
||||||
screenPos = uiModule.UIRoot.TransformPoint(pos);
|
screenPos = uiModule.UIRoot.TransformPoint(pos);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user