1
This commit is contained in:
@@ -18,11 +18,17 @@ namespace Studio
|
|||||||
rectTransform = GetComponent<RectTransform>();
|
rectTransform = GetComponent<RectTransform>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
if (rectTransform == null)
|
if (rectTransform == null)
|
||||||
return;
|
{
|
||||||
|
Debug.Log($"Not Found RectTransform in MouseObserver. {gameObject}");
|
||||||
|
Destroy(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
// 마우스가 자신의 UI(RectTransform) 영역 위에 있는지 판별
|
// 마우스가 자신의 UI(RectTransform) 영역 위에 있는지 판별
|
||||||
bool isOver = RectTransformUtility.RectangleContainsScreenPoint(
|
bool isOver = RectTransformUtility.RectangleContainsScreenPoint(
|
||||||
rectTransform,
|
rectTransform,
|
||||||
|
|||||||
Reference in New Issue
Block a user