This commit is contained in:
wsh
2025-07-01 09:24:38 +09:00
parent f0d115751b
commit 42a178c3fa

View File

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