작업 조건 분석 UI 상세 정보 패널 기능 수정
This commit is contained in:
@@ -59,6 +59,40 @@ namespace WI
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
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<RaycastResult> raycastResults = new List<RaycastResult>();
|
||||
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()
|
||||
{
|
||||
@@ -68,6 +102,9 @@ namespace WI
|
||||
if (IsClickUI)
|
||||
return;
|
||||
|
||||
if (IsOnTheUI)
|
||||
return;
|
||||
|
||||
input.GetInput();
|
||||
Movement();
|
||||
var limitCheck = maxRangeLimitter.MoveRangeLimit(nextPosition);
|
||||
|
||||
Reference in New Issue
Block a user